REBOOT
Hi,
Want the system to reboot immed after stopping services. the problem is it works well on Windows XP but not on Windows 2000. here is my script.
'If CompareGCVer("4.3.0+") Then objShell.Run SETUPAPP.strVenProdDir &"\MSutils\MSVM\javatrig.exe", 1, True ' Install MS Java VM.
' Disable screen saver.
strScreenSaveActive=objShell.RegRead(strDesktop &"ScreenSaveActive")
strSCRNSAVE=objShell.RegRead(strDesktop &"SCRNSAVE.EXE")
objShell.RegWrite strDesktop &"ScreenSaveActive", "0", "REG_SZ"
objShell.RegWrite strDesktop &"SCRNSAVE.EXE", "(None)", "REG_SZ"
Set objMarker=objFSO.CreateTextFile(strMarker) ' Create marker file.
If strSCreenSaveActive=vbNullString Then strScreenSaveActive="0"
If strSCRNSAVE=vbNullString Then strSCRNSAVE="(None)"
objMarker.WriteLine strScreenSaveActive
objMarker.WriteLine strSCRNSAVE
objMarker.Close
objShell.Run fd.strSYSUTLPath & "\sdsrbtnt.exe -d0", 2, True ' Reboot.
WScript.Sleep 30000 ' Give reboot chance to work.
WScript.Sleep 30000
WScript.Sleep 30000
WScript.Sleep 30000
Any help wld be appreciated.
Giz
Want the system to reboot immed after stopping services. the problem is it works well on Windows XP but not on Windows 2000. here is my script.
'If CompareGCVer("4.3.0+") Then objShell.Run SETUPAPP.strVenProdDir &"\MSutils\MSVM\javatrig.exe", 1, True ' Install MS Java VM.
' Disable screen saver.
strScreenSaveActive=objShell.RegRead(strDesktop &"ScreenSaveActive")
strSCRNSAVE=objShell.RegRead(strDesktop &"SCRNSAVE.EXE")
objShell.RegWrite strDesktop &"ScreenSaveActive", "0", "REG_SZ"
objShell.RegWrite strDesktop &"SCRNSAVE.EXE", "(None)", "REG_SZ"
Set objMarker=objFSO.CreateTextFile(strMarker) ' Create marker file.
If strSCreenSaveActive=vbNullString Then strScreenSaveActive="0"
If strSCRNSAVE=vbNullString Then strSCRNSAVE="(None)"
objMarker.WriteLine strScreenSaveActive
objMarker.WriteLine strSCRNSAVE
objMarker.Close
objShell.Run fd.strSYSUTLPath & "\sdsrbtnt.exe -d0", 2, True ' Reboot.
WScript.Sleep 30000 ' Give reboot chance to work.
WScript.Sleep 30000
WScript.Sleep 30000
WScript.Sleep 30000
Any help wld be appreciated.
Giz
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
kkaminsk
18 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.