+1  A: 

Well, this uses VBScript -- although truthfully it invokes the same command line shutdown that you're trying to do. I've tested it and it works.

Dim oShell 
Set oShell = CreateObject("WScript.Shell")

'restart, wait 5 seconds, force running apps to close
oShell.Run "%comspec% /c shutdown /r /t 5 /f", , TRUE

What OS are you running against? This test was against XP. I wonder if the server OS requires a shutdown code...

Mike L
Running against XP
tloach
+2  A: 

Try replacing:

retVal = OpSys.Reboot()

With:

retVal = OpSys.Win32Shutdown(6)
Matt Hanson
I assume you mean Win32ShutDown?
tloach
I'm with Matt, this is the way to go. MSDN details: http://msdn.microsoft.com/en-us/library/aa394058(VS.85).aspx
unrealtrip
+1  A: 

You can also try the psShutdown command line utility from Sysinternals now Microsoft. http://technet.microsoft.com/en-us/sysinternals/bb897541.aspx

Jason