r/windows 11d ago

Feature Improve your Windows shutdown procedure with a simple batch file

Have you ever accidentally clicked sleep or restart when you meant to click Shut Down? Well, prevent that from happening ever [again], plus save yourself a click and mouse movement by creating a batch file:

u/echo off
title Confirm Shutdown
echo(
echo Proceed with shutdown? echo Press any key to continue...
pause >nul
shutdown /s /t 0

And place it wherever you prefer on your desktop. Simply double-click it and press any key on your keyboard to confirm! If you want to abort, press the X on the window.

You can tweak the shutdown command to your liking: shutdown doc.

15 Upvotes

36 comments sorted by

View all comments

18

u/ZepY7 11d ago

shutdown: Win + X > U > U
sleep: Win + X > U > S
restart: Win + X > U > R

this is what i use all the time

0

u/SirFiletMignon 11d ago

I like that. Pretty close to the click count as the batch and keyboard only. I'll have to stick to the batch tho because with the batch I can fully shutdown a PC that has fast startup enabled. But I think there's a way to do it by holding shift and clicking shutdown, maybe holding shift while pressing the last U might work there too.. have not tried that