Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon Screen Error Stops VBScritp Cold 1

Status
Not open for further replies.

BKearan

IS-IT--Management
Sep 27, 2007
45
US
I run VBScripts on around 3200 computers at a time. Mostly, they work fine. But, if a computer is sitting at the log-on screen and has any error (usually "at least one service failed to start") AT the log-on screen, the script stops at that computer and does not continue - even with the On Error Resume Next statements.

Is there a way to get around those computers?
 
Maybe try setting a timeout value....

WScript.TimeOut = 120 ' this is seconds so 2minutes

TimeOut is undocumented, but it does work.

Example:

WScript.Echo "starting"
WScript.TimeOut = 5 ' 5 second timeout
WScript.Sleep 6000 ' 6 second pause
WScript.Echo "this line will never be reached."

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top