How to Convert WSH to EXE
The Windows Script Host (WSH) has much more powerful features than batch files and is used to run scripts written in JScript, VBScript, and other languages (e.g. Perl).
Features of WSH include the following:
- Interaction with full-featured languages with object capabilities
- The necessary set of operations with strings
- Interaction with any software implementing an object scripting interface (Active Scripting, or OLE Automation)
- Access to object methods and properties
- Operations with files and folders
- Processing text files
- Managing the registry
JS, VBS, WSF, and some other file types are run with the help of either wscript.exe (windowed execution in the GUI) or cscript.exe (batch and console execution).
A typical WSH file looks like this:
[ScriptFile] Path=C:\SHORTCUT.VBS [Options] Timeout=10 DisplayLogo=1 BatchMode=0
The file stores user preferences such as the interactive or batch mode and gives system administrators a way to let different users run the same script with different settings.
Note: If you want to convert WSH to EXE, the script itself specified in the Path variable must exist.
How to convert WSH to EXE:
- Select the Project > Build command.
- Specify the name of the exe file and the location where the exe file should be saved.
- Click the Save button.
ExeScript will convert WSH to EXE and inform you about the result.
If you want to create an exe from a WSH file and distribute it freely to any computer, include this line in the script:
Path=shortcut.vbs
Then add the file shortcut.vbs to the Resource View pane in ExeScript.
See also:
Convert Script to EXE
Convert BAT to EXE
Convert VBS to EXE
Convert HTA to EXE
Convert JS to EXE
Batch File Commands
|