Creating .WSH Files to Record Script Options

You can record specific settings for each script you run by creating a control file for that script with a .wsh file extension.

A .wsh file is a text file that uses a format similar to that of .ini files. It is created automatically when you set the properties for a supported script file.

The following steps describe how to create a .wsh file for a script:

    To create a .wsh file for a given script
  1. Right-click the given script file in Windows Explorer.
  2. Click Properties on the context menu that appears.
  3. Choose the settings you want for the script on the properties page.
  4. Click OK or Apply.

A .wsh file is automatically created. It has the same name as the script file you right-clicked. A sample .wsh file might contain the following text:

[ScriptFile]
Path=C:\WINNT\Samples\WSH\showprop.vbs

[Options]
Timeout=0
DisplayLogo=1
BatchMode=0

The Path setting in the [ScriptFile] section identifies the script file associated with this .wsh file. The keys in the [Options] section correspond to settings in the Script tab within the Properties dialog box.