I am trying to set up an auto-reboot script to reboot my Windows 7 workstations. I have the following command set up as a batch file and set up to run using task scheduler:
shutdown.exe /r
If I have an open document with changes that have not been saved, the command I have used will not save the recent changes to the document but will prompt me to save. Is there a command that I can add to this string to save the changes to the document before the workstation reboots.
Any help with this would be greatly appreciated.
Software/Hardware used:
Windows 7
ASKED:
June 20, 2011 1:39 PM
UPDATED:
April 19, 2013 7:35 PM
Did you tried
shutdown /r /f
/f forces windows to shutdown without warning.
open the command prompt and type ‘shutdown /?’ to see all of your available options for this function.
I don’t think you’ll need it in a batch file as i think you can just put it in scheduled tasks as is.
We are on a domain and we run it from a server so the user’s can’t stop it or disable it. add \machinename to the batch file and set it up as a task but the .bat and task are on the server. We have user’s who won’t shutdown their machine and this way we jam it down their throats.
“/c”
will allow you to display a prompt advising the user you have scheduled a reboot. One problem with setting up a scheduled reboot of this kind is that the user might be changing his finished document. The auto save might save text the end user did not want saved and possibly leaving you with the repercussions.
Best way to accomplish this task is advise all users to save their documents because you will automate a reboot on all machines which will cause all unsaved work to be deleted. The end user will be fully aware that they might loose their work if they do not take the steps to save.