Description of Windows Script Host (WSH)
This article was previously published under Q188135
This article has been archived. It is offered "as is" and will no longer be updated.
This article describes the Windows Script Host (WSH) in Windows.
WSH is a language-independent scripting host for 32-bit Windows platforms.Microsoft provides both Microsoft Visual Basic Script and Java Scriptscripting engines with WSH. It serves as a controller of ActiveX scriptingengines, just as Microsoft Internet Explorer does. Because the scriptinghost is not a full Internet browser, it has a smaller memory footprintthan Internet Explorer; therefore, WSH is appropriate for performingsimple, quick tasks. Scripts can be run directly from the desktop bydouble-clicking a script file, or from a command prompt. WSH provides alow-memory scripting host that is ideal for non-interactive scriptingneeds such as logon scripting, administrative scripting, and so on. WSHcan be run from either the protected-mode Windows-based host(Wscript.exe), or the real-mode command shell-based host (Cscript.exe).
Installing Windows Script HostTo install the Windows Script Host, please see the following Microsoft Web site:NOTE: Windows Script Host is included in Microsoft Internet Explorer 5.
Running ScriptsTo run scripts from within Windows, you can use one of the following methods:
- Double-click a .vbs or .js file.
- Click Start, click Run, and then type the name of a .vbs or .js file in the Open box.
Internet Explorer 5:
Some software (ActiveX controls) on this page might be unsafe. It is recommended that you not run it. Do you want to allow it to run?Internet Explorer 4.0, 4.01, 4.01 Service Pack 1:
An ActiveX object on this page may be unsafe. Do you want to allow it to initialize and be accessed by scripts?To enable Internet Explorer 4.0 or later to initialize and script WSHobjects from a Web page without warnings (not recommended), select acustom setting for the security zone where the Web page resides, andenable the Initialize and script ActiveX controls not marked as safeoption.
Note that Web sites can also create links to .vbs or .js files on a Webpage. When you click such a link in Internet Explorer, a File Downloaddialog box appears prompting you (by default) to either open the file fromits current location or save the file to disk. If you click Open, the fileis downloaded and run from your local file system bypassing InternetExplorer's security settings.
IMPORTANT: If you click Open in the File Download dialog box and click theAlways ask before opening this type of file check box to clear it,Internet Explorer no longer prompts you with a File Download dialog box.To cause Internet Explorer to prompt you with a File Download dialog boxagain, follow these steps:
- In My Computer, click Folder Options on the View menu.
- On the File Types tab, select the appropriate registered file type (.vbs or .js).
- Click Edit, and then click the Confirm open after download check box to select it.
- Click OK, and then click OK again.
Minimum Requirements for WSHThe minimum requirement for WSH to function is Internet Explorer version3.0 or later. WSH relies on the Visual Basic Script and Java Scriptengines provided in Internet Explorer.
Troubleshooting WSHSeveral sample scripts are installed in the Windows\Samples\WSH folder. Ifthese scripts run correctly, but others do not, contact the author of thescript for support. Support and additional information is also availableon the following Microsoft Web site:
Article ID: 188135 - Last Review: 12/05/2015 08:50:22 - Revision: 3.6
Microsoft Windows 95, Microsoft Windows 95, Microsoft Windows 98 Standard Edition, Microsoft Windows 98 Standard Edition
- kbnosurvey kbarchive kbinfo KB188135