Windows Script Host is a Windows management tool. Windows 98 has been introduced and will be supported by Windows later.
It is interpreted and executed by wscript cscript (which is installed in the System32 directory of Windows by default, wscript.exe: Gui-based cscript.exe: Command Line-based, and the execution parameters are identical, with no difference.
Currently, powershell is introduced for Windows Management, which is more powerful Based on. NET. However, wsh still plays an important role in the maintenance and upgrade of existing investment.
Script and Windows Automation
Scripts are written in the script language (such as JScript and VBScript, which are built in Windows by default ).Program. Optional scripting languages include Rexx, Python, and Perl. AndProgramming Language(Such as C ++ and Visual Basic), the script language is more suitable for creating short applications to quickly solve small problems.
In many cases, scripts are used to automate manual tasks, which is like macros. The script is very suitable:
- Operating Windows
- Run other programs
- Automate the login process
- Send key order to Application
- ...
Script file type
Extension |
Script Type |
Description |
. Bat |
MS-DOS batch files |
Batch files for MS-DOS Operating Systems |
. Asp |
ASP page |
Active Server Page File |
. Html |
HTML file |
Web Page |
. Js |
JScript File |
Windows Script |
. Vbs |
VBScript File |
Windows Script |
. WSF |
Windows Script Host File |
A Windows Script container or project file, which is supported by wsh 2.0 or later. |
. Wsh |
Windows Script Host File |
The property file of the script file, which is supported by wsh 1.0 or later. |
Suggestion: If you are familiar with basic, Use Vbscript to write scripts. If you are familiar with C/C ++ or Javascript, use JScript to write scripts.