Content starts here
CLOSE ×

Search

Shutdown or Restart Computer with One Click

Reply
Trusted Social Butterfly

Shutdown or Restart Computer with One Click

I figured out how to do it in Windows 10.

 

1. Use Notepad to create two BAT files that can be named Off.bat and Restart.bat .  Do not name the file "Shutdown.bat", for reasons too long to explain.

 

In Off.bat, put this line:

 

shutdown /s /t 0

 

In Restart.bat put this line:

 

shutdown /r /t 0

 

2. Using File Explorer, while holding the right mouse button down, drag the files to the desktop and select Create Shortcuts from the context menu.  At this stage, you can shutdown or restart by double clicking these icons.

 

3. To use one click, you need to put the icons on the taskbar but this can't be done as is.  Right click on the icons and select Properties.

 

On Target, you will see the full path to the file, e.g.,

 

D:\Documents\Off.bat

 

Change that to, e.g.,

 

cmd /c "D:\Documents\Off.bat"

 

Click Apply and close the dialog box.  The icon's appearance should change.

 

4. Right click on the two icons and select Pin to Taskbar.  Now, one click on the respective Taskbar icon will shutdown or restart your computer.

 

There is a program for putting your computer to sleep but I can't get it to work properly.  See

 

https://docs.microsoft.com/en-us/sysinternals/downloads/psshutdown

 

It seems to work properly with hibernation but I don't know much about hibernation.

 

0 Kudos
857 Views
0
Report
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Users
Need to Know

NEW: AARP Games Tournament Tuesdays! This week, achieve a top score in Bubble Shooter and you could win $100! Learn More.

AARP Games Tournament Tuesdays

More From AARP