Windows 10 sleep shortcut

Page 1 of 2 12 LastLast

  1. Posts : 18
    Windows 10 Pro
       #1

    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
    Last edited by maxiu; 07 Aug 2015 at 01:35.
      My Computer


  2. Posts : 384
    Window 10
       #2

    maxiu said:
    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.
      My Computer


  3. Posts : 18
    Windows 10 Pro
    Thread Starter
       #3

    D:\PSTools\psshutdown.exe -d -t 0 -accepteula
      My Computer


  4. Posts : 10
    Windows 10
       #4

    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:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState
    C:\Windows\System32\rundll32.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.
    Last edited by GODisaRefuge4Us; 03 Oct 2015 at 22:09.
      My Computer


  5. Posts : 10
    Windows 10
       #5

    deleted, combined with prior post
    Last edited by GODisaRefuge4Us; 03 Oct 2015 at 22:10. Reason: deleted, combined with prior post
      My Computer


  6. Posts : 1,937
    win 10 Insider
       #6

    I use a shortcut with this code C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState
    Start it in windows\system32
    Certainly works here.
      My Computers


  7. Posts : 10
    Windows 10
       #7

    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:\Windows\System32\rundll32.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).

    Tenforums 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.
      My Computer


  8. Posts : 10
    Windows 10
       #8

    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:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState

    FYI.
      My Computer


  9. Posts : 1,937
    win 10 Insider
       #9

    Ah, I always turn off hibernation.
      My Computers


  10. Posts : 1
    Windows 10 pro
       #10

    GODisaRefuge4Us said:
    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:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
    C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState

    FYI.
    Brilliant! I've trawled the internet loking for a solution to this. Still a problem running a current Win 10 (Build 14986.rs_prerelease.161202-1928).

    I had the problem noted in the OP with the POST screen and slower startup from 'sleep'. And occasionally it would not restore at all, but start up afresh as though it had been shut down.

    Running powerconfig -hibernate off solves this and I now have instant startup.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:30.
Find Us




Windows 10 Forums