Buildboy
09-04-2007, 02:17 PM
Hi,
I have a VB script to force reboot depending on the Error code I get back from my executable, it works on 2K3 and XP but it fails on 2K with the following error,
Error in Run Script (VBScript) script code at Line 2, Column 1 (Generic failure)
here is the script, any idea why?
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Reboot()
next
Thanks :)
I have a VB script to force reboot depending on the Error code I get back from my executable, it works on 2K3 and XP but it fails on 2K with the following error,
Error in Run Script (VBScript) script code at Line 2, Column 1 (Generic failure)
here is the script, any idea why?
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Reboot()
next
Thanks :)