The following sections include information about the methods of Windows Script Host.
In This Section
- AddPrinterConnection Method
 - 
          
Adds a DOS-style printer connection to your computer.
 
- AddWindowsPrinterConnection Method
 - 
          
Adds a Windows-style printer connection to your computer.
 
- AppActivate Method
 - 
          
Activates an application window.
 
- Close Method
 - 
          
Closes an open stream.
 
- ConnectObject Method
 - 
          
Connects an object's event sources to functions with a given prefix.
 
- Count Method
 - 
          
Returns the number of switches in the WshNamed or WshUnnamed objects.
 
- CreateObject Method
 - 
          
Creates an object specified by the strProgID parameter.
 
- CreateScript Method
 - 
          
Creates a WshRemote object (an object that represents an instance of a script running in a remote process).
 
- CreateShortcut Method
 - 
          
Creates an object reference to a shortcut or URLshortcut.
 
- DisconnectObject Method
 - 
          
Disconnects a previously connected object from Windows Script Host.
 
- Echo Method
 - 
          
Sends output to a dialog box or the console.
 
- EnumNetworkDrives Method
 - 
          
Returns the current network drive mappings.
 
- EnumPrinterConnections Method
 - 
          
Returns the current network printer mappings.
 
- Exec Method
 - 
          
Runs an application in a child command-shell, providing access to the stdin/stdout/stderr channels, and the sharing of environment variables.
 
- Execute Method
 - 
          
Starts execution of a remote script object.
 
- Exists Method
 - 
          
Indicates whether a specific key value exists in the WshNamed object.
 
- ExpandEnvironmentStrings Method
 - 
          
Expands the requested environment variable from the running process and returns the result string.
 
- GetObject Method
 - 
          
Retrieves an Automation object from a file or an object specified by the strProgID parameter.
 
- getResource Method
 - 
          
Returns the value of a resource defined with the resource element.
 
- LogEvent Method
 - 
          
Logs an event in the Windows NT event log or WSH.log file.
 
- MapNetworkDrive Method
 - 
          
Maps the share point specified by strRemoteName to the local resource name strLocalName.
 
- Popup Method
 - 
          
Displays a pop-up message box window that contains the message contained in strText.
 
- Quit Method
 - 
          
Quits execution with a specified error code.
 
- Read Method
 - 
          
Reads a specified number of characters from an input stream and returns the resulting string.
 
- ReadAll Method
 - 
          
Reads an entire input stream and returns the resulting string.
 
- ReadLine Method
 - 
          
Reads an entire line (up to, but not including, the newline character) from an input stream and returns the resulting string.
 
- RegDelete Method
 - 
          
Deletes from the registry the key or value named by strName.
 
- RegRead Method
 - 
          
Returns the registry key or value named by strName.
 
- RegWrite Method
 - 
          
Sets the registry key or value named by strName.
 
- Remove Method
 - 
          
Deletes the environment variable specified by strName.
 
- RemoveNetworkDrive Method
 - 
          
Removes the current resource connection denoted by strName.
 
- RemovePrinterConnection Method
 - 
          
Removes the current resource connection denoted by strName.
 
- Run Method
 - 
          
Creates a new process that executes strCommand.
 
- Save Method
 - 
          
Saves a shortcut to the specified location.
 
- SendKeys Method
 - 
          
Sends one or more keystrokes to the active window (as if typed on the keyboard).
 
- SetDefaultPrinter Method
 - 
          
Sets the default printer to the remote printer specified.
 
- ShowUsage Method
 - 
          
Displays information about how a script should be used.
 
- Sign Method
 - 
          
Signs a script stored in a string.
 
- SignFile Method
 - 
          
Signs a script using a digital signature.
 
- Skip Method
 - 
          
Skips a specified number of characters when reading an input stream.
 
- SkipLine Method
 - 
          
Skips the next line when reading an input stream.
 
- Sleep Method
 - 
          
Places the script process into an inactive state for the number of milliseconds specified and then continues execution.
 
- Terminate Method (WshScriptExec)
 - 
          
Instructs the script engine to end the process started by the Exec method.
 
- Verify Method
 - 
          
Verifies a digital signature retrieved as a string.
 
- VerifyFile Method
 - 
          
Verifies the digital signature encapsulated in a script.
 
- Write Method
 - 
          
Writes a specified string to an output stream.
 
- WriteBlankLines Method
 - 
          
Writes a specified number of newline characters to an output stream.
 
- WriteLine Method
 - 
          
Writes a specified string and newline character to an output stream.