WSH » WScript » Timeout

Syntax:
WScript.Timeout[ = lngTimeout]

The Timeout property is used to set or get the timeout period (in seconds) for the currently executing script. The script will automatically be terminated after the number of seconds specified by this property, which is of type Long.

This property is not currently documented by Microsoft.

Examples

Code:
WScript.Timeout = 2
WScript.Echo "Starting Script"
WScript.Sleep 5000
WScript.Echo "Ending Script"
Output:
Starting Script
Script execution time was exceeded on script "C:\test.vbs".
Script execution was terminated.
Explanation:

This VBScript code illustrates the use of this property when run under cscript.

Language(s): VBScript