Byothe.frTips and tricksHow to Create a Shortcut to Sleep Your Computer in Windows

How to Create a Shortcut to Sleep Your Computer in Windows

I changed my keyboard a few days ago and while overall I am very satisfied with this new keyboard, there is one thing I regret, it is the button to put my computer on standby which was present on my previous keyboard.

The procedure for putting your computer to sleep under Windows 10 is not particularly restrictive, but it still requires 3 operations: open the Windows menu, click on On/Off and finally click on Sleep.

Create a Windows Sleep Shortcut

It's not the end of the world, but it's too long for my taste... While searching on the Internet, I came across a relatively simple solution to create a shortcut that will put your machine to sleep with a simple double-click. I tested this trick under Windows 10, but it is very likely that it works since Windows XP (XP, Vista, 7, 8, 10 and 11).

Create a Windows sleep shortcut on your computer

Follow these simple steps to create a Windows Sleep shortcut on your desktop:

1- To start, create a shortcut to the location you want on your computer (e.g. the desktop) by right-clicking and selecting New > Shortcut

Create a Windows Sleep Shortcut

2- In the window that opens you must specify the command next in the field Enter item location :

  • For a standard standby:
rundll32.exe powrprof.dll, SetSuspendState 0,1,0
  • For hibernation:
rundll32.exe powrprof.dll, SetSuspendState 1,1,0
Shutdown.exe -s -t 00
  • To lock the work session:
rundll32.exe user32.dll, LockWorkStation
Create a Windows Sleep Shortcut

3- Press Next

4- Enter a name for your shortcut in the field provided for this purpose (for example “Put on standby”)

Create a Windows Sleep Shortcut
Last step to create a Windows sleep shortcut: name the shortcut

5- Press finish

That's it. If you double-click on your new shortcut, your computer will immediately go to sleep. You can also create as many shortcuts as you want: one for sleep, another to turn off the computer…

Customizing and using the shortcut

Now that you have created a Windows Sleep shortcut, you can customize its icon and place it in the taskbar for quick access. Additionally, if your keyboard has programmable keys, assign the shortcut to one of them for maximum efficiency.

How to change shortcut icon

It is quite possible to change the default icon of the shortcut by doing the following:

  1. Right click on your shortcut
  2. Go to Properties
  3. Click on Change icon
  4. Click on Browse
  5. In C: \ Windows \ System32 \ search for the file Shell32.dll and do Open
  6. Choose the icon you like and click on Ok
change-icon

Assign a keyboard shortcut to this sleep action

It is also possible to set up a keyboard shortcut to launch this shortcut. After creating the shortcut:

  • right click on it
  • go to “Properties”
  • In the “Shortcut” tab, you will find a “Shortcut Key” field where you can assign the key combination of your choice.

Try to find an unused key combination to avoid problems… if you press Ctrl+C, you will put your computer to sleep every time you want to copy text. That said, it can make a good joke for a colleague who has left his session open.

Adding shortcut to taskbar

Finally, to save even more time, you can drag this shortcut into the taskbar (the one at the bottom of your computer where open programs are displayed). This way you will always have it on hand to put your computer to sleep very, very quickly.

With this quick and easy method, no more unnecessary clicks to put your Windows computer to sleep. You optimize your time and enjoy quick access to this feature. Don't forget to customize your shortcut to make it even more accessible and enjoyable to use!

Article updated on September 15, 2025 by Byothe

Byothe
Byothehttps://byothe.fr
As a forty-something dad fascinated by the web, I spend a lot of my time keeping watch to find you the best news. Tips and tricks, humor, websites and high-tech are the main subjects I want to cover here… but I will not fail to offer you good deals gleaned here and there on the web…

Related articles

3 COMMENTS

  1. Thanks a lot for the tip! Just a question: I have a laptop and I just want to put the screen to sleep, does that work too?

LEAVE A COMMENT

Please enter your comment!
Please enter your name here


Discord

Want to chat live? Come and meet us on the Byothe.fr Discord server

Newsletter

Subscribe and receive a summary of web news every Monday

Latest news

Randomly