I'm trying to edit a notepad's .txt on the desktop, and then restart

Normally, when I press the restart button from the start menu, it allows me to save the .txt file

save notapad txt

And then it shows a screen asking if I want to force applications to close

proper shutdown

This is absolutely NORMAL..

But when I use command line or batch files, it does not allow me to close/save applications, and there is no force screen... It restarts the system without saving files...

I'm trying to use these commands with no success:

shutdown /r


shutdown /r /t 10 /c "this is a comment"

Please tell me what I'm doing wrong?


Your timeout is probably too short. 10 seconds isn't long enough for Windows to generate and display a prompt before shutdown. Try bumping that up to 300 (5 minutes) and test nudging it down to get the delay you prefer.

BTW, I think Win8 (maybe 7 as well) displays this as a bubble notification instead of a good ol' fashioned dialogue so pay attention to that. HTH

|improve this answer|||||

That’s because using a timeout implies /f. From shutdown /?:

/t xxx     Set the time-out period before shutdown to xxx seconds.
           The valid range is 0-315360000 (10 years), with a default of 30.
           If the timeout period is greater than 0, the /f parameter is

(Emphasis mine)

/f means:

/f         Force running applications to close without forewarning users.
           The /f parameter is implied when a value greater than 0 is
           specified for the /t parameter.

This behavior cannot be changed. However, the user will be notified that a shutdown/reboot/logoff event is imminent:

enter image description here
(On Windows 10. Earlier versions had balloon tips IIRC.)

Whether they choose to act appropriately is another question of course.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.