Export (0) Print
Expand All

Interactive Property

Sets the script mode, or identifies the script mode.


                      object.Interactive 

object

WScript object.

The Interactive Property returns a Boolean value.

There are two modes, batch and interactive. In interactive mode (the default), the script provides user interaction. Input to and output from the Windows Script Host is enabled. The script can echo information to dialog boxes and can wait for the user to provide feedback. In batch mode, this type of user interaction is not supported — all input and output to WSH is disabled. You can also set the script mode using the Windows Script Host command line switches //I (for Interactive), and //B (for Batch).

The following JScript code displays the script mode.

WScript.Echo WScript.Interactive;

The following JScript code sets the script mode to batch.

WScript.Interactive = false;

Applies To:

Community Additions

Show:
© 2014 Microsoft