The information in this article applies to:
SUMMARYThis article describes the Windows Script Host (WSH) in Windows. MORE INFORMATIONWSH is a language-independent scripting host for 32-bit Windows platforms. Microsoft provides both Microsoft Visual Basic Script and Java Script scripting engines with WSH. It serves as a controller of ActiveX scripting engines, just as Microsoft Internet Explorer does. Because the scripting host is not a full Internet browser, it has a smaller memory footprint than Internet Explorer; therefore, WSH is appropriate for performing simple, quick tasks. Scripts can be run directly from the desktop by double-clicking a script file, or from a command prompt. WSH provides a low-memory scripting host that is ideal for non-interactive scripting needs such as logon scripting, administrative scripting, and so on. WSH can be run from either the protected-mode Windows-based host (Wscript.exe), or the real-mode command shell-based host (Cscript.exe). Installing Windows Scripting HostTo install the Windows Scripting Host, please see the following Microsoft Web site:http://msdn.microsoft.com/scripting/default.htm?/scripting/windowshost/docs/samples/default.htmNOTE: Windows Scripting Host is included in Microsoft Internet Explorer 5. Running ScriptsTo run scripts from within Windows, you can use one of the following methods:
Internet Explorer 5: Internet Explorer 4.0, 4.01, 4.01 Service Pack 1: To enable Internet Explorer 4.0 or later to initialize and script WSH objects from a Web page without warnings (not recommended), select a custom setting for the security zone where the Web page resides, and enable the "Initialize and script ActiveX controls not marked as safe" option. Note that Web sites can also create links to .vbs or .js files on a Web page. When you click such a link in Internet Explorer, a File Download dialog box appears prompting you (by default) to either open the file from its current location or save the file to disk. If you click Open, the file is downloaded and run from your local file system bypassing Internet Explorer's security settings. IMPORTANT: If you click Open in the File Download dialog box and click the "Always 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 box again, follow these steps:
Minimum Requirements for WSHThe minimum requirement for WSH to function is Internet Explorer version 3.0 or later. WSH relies on the Visual Basic Script and Java Script engines provided in Internet Explorer.Troubleshooting WSHSeveral sample scripts are installed in the Windows\Samples\WSH folder. If these scripts run correctly, but others do not, contact the author of the script for support. Support and additional information is also available on the following Microsoft Web site:http://msdn.microsoft.com/scripting/windowshost/default.htm Additional query words:
Keywords : kbtool win98 |
Last Reviewed: August 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |