Location:
State:
Carrier
Country
Status

Windows 10 sleep shortcut


Hello,
in Windows 7 I used this cmd to sleep my PC:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0 (I have hibernation disabled)
when I pressed a key my desktop would come up instantly, but now in Windows 10 it goes all the way through POST screen, the loading screen and then I see my desktop which takes a bit longer. Interestingly if I sleep my PC with the start menu (right click power > sleep) pressing a key wakes it up instantly just like on Windows 7. What's wrong with the cmd command and how can I fix it? I really would like to have an icon on my desktop for this.
Thanks.

ed. ok I solved my problem by using PsShutdown

Hello,
in Windows 7 I used this cmd to sleep my PC:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0 (I have hibernation disabled)
when I pressed a key my desktop would come up instantly, but now in Windows 10 it goes all the way through POST screen, the loading screen and then I see my desktop which takes a bit longer. Interestingly if I sleep my PC with the start menu (right click power > sleep) pressing a key wakes it up instantly just like on Windows 7. What's wrong with the cmd command and how can I fix it? I really would like to have an icon on my desktop for this.
Thanks.

ed. ok I solved my problem by using PsShutdown
Could you provide the full command line you're using (for those of us that aren't quite up to speed on the PsShutdown flags)? Thank you in advance.

D:PSToolspsshutdown.exe -d -t 0 -accepteula

Hello. Does anyone know how to create a desktop shortcut to invoke sleep in Windows 10 without having to run third-party software like PSTools?

I have tried the following, but they are not the same as "sleep":
C:WindowsSystem32 undll32.exe powrprof.dll,SetSuspendState 0,1,0
C:WindowsSystem32 undll32.exe powrprof.dll,SetSuspendState
C:WindowsSystem32 undll32.exe Powrprof.dll,SetSuspendState Sleep

rundll32.exe powrprof.dll,SetSuspendState 0,1,0 makes my Win8 to hibernate (suspend-to-disk). It does not make it Suspend-to-RAM (named Sleep or Standby, depending on windows version) neither does it make go to hybrid sleep (suspend-to-RAM while at the same time save state to disk), as the Sleep option in the Shutdown menu.

They seem to work, but it is not sleep mode, because the power button does not flash and I can't wake my PC using my mouse. I think the above commands may be hibernate; the only way to wake the PC is by pressing the power button.

Thank you.

deleted, combined with prior post

I use a shortcut with this code C:WindowsSystem32 undll32.exe powrprof.dll,SetSuspendState
Start it in windowssystem32
Certainly works here.

Thanks Linw. I had that listed in my first post, and I will use it. However, it doesn't function the same as when I right click the windows button, choose "shut down or sign out", and then select Sleep.

With the command C:WindowsSystem32 undll32.exe powrprof.dll,SetSuspendState
  1. the light on my PC power button does not flash (to indicate sleep mode); instead, the light is off
  2. I can't wake my PC by using my mouse (I have to press my PC power button)

So, it's not the same, but it does work (i.e., it does "sleep" my PC and wake it again).

windowssh blog can archive this thread, if they like. My preference would be to find the command that acts the same as "sleep" when I select it from the windows button. Not a big deal, but it would be nice to have the same functionality. Thank you.

I think I found the answer.

Although I had turned-off the ability to hibernate in Control Panel/Power Options, apparently that's not enough. I also had to run the following command as administrator from a command prompt:

powercfg -hibernate off

After running the above command, either of the following shortcuts worked just like when I select "sleep" from the windows button:
C:WindowsSystem32 undll32.exe powrprof.dll,SetSuspendState 0,1,0
C:WindowsSystem32 undll32.exe powrprof.dll,SetSuspendState

FYI.

Ah, I always turn off hibernation.

Windows 10 sleep shortcut