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

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.

0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Without looking too closely at your code some reboot utilities just don't work so well. Here is how to do it via WMI.

Answered 05/25/2006 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
tnx mate.

Answered 05/30/2006 by: gizmolala
Third Degree Blue Belt

Please log in to comment