WScript Object
Property: WScript.Interactive
WScript.
Interactive
The
Interactive
property returns a Boolean that indicates whether or not the host executable file (cscript or wscript) was invoked in interactive mode. This property is read/write and can be used to change the mode of the currently executing script at runtime. When this property is False, interactive commands such as Echo, MsgBox and InputBox have no effect. The
WshShell.Popup
method, and the use of
StdErr
,
StdIn
and
StdOut
are, however, unaffected by the setting of this property.
The following JScript code illustrates the use of this property.
Code:
WScript.Echo("Hello")
WScript.Interactive = false
WScript.Echo("In non-interactive mode")
WScript.Interactive = true
WScript.Echo("Goodbye")
Output:
Hello
Goodbye
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information