/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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
0 Comments   [ - ] Hide Comments

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

Answers

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

http://www.windowsitpro.com/Article/ArticleID/42982/42982.html
Answered 05/25/2006 by: kkaminsk
Ninth Degree Black Belt

Please log in to comment
0
tnx mate.

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

Please log in to comment