/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (2)

Posted by: kkaminsk 18 years ago
9th Degree Black Belt
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
Posted by: gizmolala 18 years ago
Third Degree Blue Belt
0
tnx mate.

Giz
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ