Restarting windows
Keywords: restart windows window command boot reboot Unconditionally Restart Windows
Question:
In the WinBatch compiler is it possible to restart windows? I know it is possible to terminate windows with EndSession, but I haven't been able to find a way to restart windows.Answer:
The "EndSession" function logs the current user out of the session, and starts a new session. If there is no password to type, it basically drops straight into a new session.If you want to shutdown the computer, reboot, etc etc, look at the IntControl functions. Check out IntControls 66, 67 and 68
To Restart Windows...
IntControl(66,0,0,0,0)To Reboot your Machine...
IntControl(67,0,0,0,0)This is a bit obscure, but it indeed works.Unconditionally restarting Windows:
Is there a way to Unconditionally Restart Windows no matter what programs are currently running? For example, I tried:IntControl(12,5,0,0,0) IntControl(67,0,0,0,0)but, if Notepad is running with an unsaved document, I get asked if I want to save the document, and then Windows doesn't shut down and restart.I have seen other programs do this, but I'm not sure how to do it with winBatch.
Answer:
IntControl(67,0,1,0,0)Note the FORCE parameter.
Article ID: W13320Filename: Restarting windows .txt