LeviDaily
asked on
Stop Service, Wait 5 Minutes, Then restart computer
I need a simple vbs script that
stops service d3vme
wait 5 minutes (make sure service stops)
reboot server
stops service d3vme
wait 5 minutes (make sure service stops)
reboot server
I don't believe there is a sleep command in VBScript, but I could be mistaken...
ASKER
ok...Would the best be to use a batch command? If so, do you have one?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Oh, and you can hide those command prompts:
Set objShell = CreateObject("WScript.Shel l")
objShell.Run "net stop d3vme", 0, True
objShell.Run "shutdown -r -t 300", 0, False
The second parameter of zero means run it hidden, the third parameter waits for the comand to finish before processing the next one.
Regards,
Rob.
Set objShell = CreateObject("WScript.Shel
objShell.Run "net stop d3vme", 0, True
objShell.Run "shutdown -r -t 300", 0, False
The second parameter of zero means run it hidden, the third parameter waits for the comand to finish before processing the next one.
Regards,
Rob.
ASKER
Thanks!