Share via


Methods (Windows Script Host) 

The following sections include information about the methods of Windows Script Host.

In This Section

  • Count Method
    Returns the number of switches in the WshNamed or WshUnnamed objects.
  • CreateScript Method
    Creates a WshRemote object (an object that represents an instance of a script running in a remote process).
  • Echo Method
    Sends output to a dialog box or the console.
  • Exec Method
    Runs an application in a child command-shell, providing access to the stdin/stdout/stderr channels, and the sharing of environment variables.
  • Exists Method
    Indicates whether a specific key value exists in the WshNamed object.
  • GetObject Method
    Retrieves an Automation object from a file or an object specified by the strProgID parameter.
  • 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.
  • Remove Method
    Deletes the environment variable specified 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).
  • Skip Method
    Skips a specified number of characters 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.
  • Verify Method
    Verifies a digital signature retrieved as a string.
  • Write Method
    Writes a specified string to an output stream.
  • WriteLine Method
    Writes a specified string and newline character to an output stream.