Force restart in middle of action

(imported topic written by cstoneba)

I want to force a restart in the middle of the action. The easiest way I can think to do it is the command ‘dos shutdown -r -f -t 00’, but I read in the forum that BigFix suggests using it’s restart commands. However, I don’t want the restart to occur after the action is complete. What is the way around this?

using the command ‘restart’ prompts the user to restart, so that’s no good.

(imported comment written by cstoneba)

Well, I got it to work running the follwoing vbs script.

//restart

delete __appendfile

appendfile Set objWMIService = GetObject(“winmgmts:” _

appendfile & “{{impersonationLevel=impersonate,(Shutdown)}!\.\root\cimv2”)

appendfile Set colOperatingSystems = objWMIService.ExecQuery _

appendfile (“Select * from Win32_OperatingSystem”)

appendfile For Each objOperatingSystem in colOperatingSystems

appendfile ObjOperatingSystem.Reboot()

appendfile Next

move __appendfile restart.vbs

waithidden “{pathname of system folder}\wscript.exe” restart.vbs

delete restart.vbs

(imported comment written by BenKus)

Hi cstoneba,

Actually, there is a much easier way:

restart

– prompts the user to click OK

restart

– counts down and restarts the computer

You can see the restart/shutdown section at: http://support.bigfix.com/bes/misc/customactions.html

Ben

(imported comment written by cstoneba)

I’ve tried both and when I used restart 0, it still required the user to click Take Action.

(imported comment written by BenKus)

I am not sure if “restart 0” works… Try “restart 30”…

Ben