Does anybody have a working solution for restarting within a startup script? I have tried the following:
SHUTDOWN.EXE (from NT/2000 Resource Kit)
shutdown /L /R /T:1 /Y
shutdown.exe (comes with XP)
shutdown -r -t 1
psshutdown.exe (SysInternals)
psshutdown -r -t 1
My code looks like this:
Code:
If $bRebootRequired = True
;$RunCommand = "\\SCONET\Netlogon\Util\shutdown /L /R /T:1 /Y"
$RunCommand = "\\SCONET\Netlogon\Util\psshutdown -r -t 1"
RUN $RunCommand
EndIf
This all works while logged in, but not during startup. They just do nothing during the startup.
Doing some searching on this topic it seems that other folks have had this problem as well. One popular solution was to create an SMS object that reboots. Not really an option for me. I suppose I could create an MSI that does nothing and reboots...but that seems a little excessive.
Anybody have this working?