Page 1 of 2 12 LastLast
  1.    06 Aug 2015 #1
    Join Date : Aug 2015
    Posts : 18
    Windows 10 Pro

    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 ComputerSystem Spec
  2.    15 Aug 2015 #2
    Join Date : Sep 2014
    Posts : 340
    Window 10

    Quote Originally Posted by maxiu View Post
    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 ComputerSystem Spec
  3.    15 Aug 2015 #3
    Join Date : Aug 2015
    Posts : 18
    Windows 10 Pro
    Thread Starter

    D:\PSTools\psshutdown.exe -d -t 0 -accepteula
      My ComputerSystem Spec
  4.    03 Oct 2015 #4
    Join Date : Oct 2015
    Posts : 6
    Windows 10

    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 ComputerSystem Spec
  5.    03 Oct 2015 #5
    Join Date : Oct 2015
    Posts : 6
    Windows 10

    deleted, combined with prior post
    Last edited by GODisaRefuge4Us; 03 Oct 2015 at 22:10. Reason: deleted, combined with prior post
      My ComputerSystem Spec
  6.    03 Oct 2015 #6
    Join Date : Oct 2014
    Posts : 1,441
    win 10 Insider

    I use a shortcut with this code C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState
    Start it in windows\system32
    Certainly works here.
      My ComputerSystem Spec
  7.    03 Oct 2015 #7
    Join Date : Oct 2015
    Posts : 6
    Windows 10

    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 ComputerSystem Spec
  8.    03 Oct 2015 #8
    Join Date : Oct 2015
    Posts : 6
    Windows 10

    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 ComputerSystem Spec
  9.    03 Oct 2015 #9
    Join Date : Oct 2014
    Posts : 1,441
    win 10 Insider

    Ah, I always turn off hibernation.
      My ComputerSystem Spec
  10.    22 Feb 2017 #10
    Join Date : Aug 2015
    Posts : 1
    Windows 10 pro

    Quote Originally Posted by GODisaRefuge4Us View Post
    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 ComputerSystem Spec

 
Page 1 of 2 12 LastLast


Similar Threads
Thread Forum
Customization Turn On or Off Shortcut Name Extension in Windows 10
How to Turn On or Off 'Shortcut' Name Extension for New Shortcuts in Windows 10 When you right click or press and hold on a file, folder, or drive and click tap on either Create shortcut or Send to -> Desktop (create shortcut), a shortcut to that...
Tutorials
Customization Create This PC Shortcut in Windows 10
How to Create a This PC Shortcut in Windows 10 My Computer was changed to This PC in Windows 8.1 and Windows RT 8.1. You would open File Explorer to view This PC. In Windows 10, File Explorer now opens to Quick access by default instead of...
Tutorials
Cannot go to Sleep (S3) or even sleep the monitor for Win 10
I upgraded from 8.1 to 10 on the 29th. At that time my system would go to standby sleep without and issue. Since the big day, I can only get it to sleep by using the sleep option on the shut down or sign out drop down. I have reinstalled my...
General Support
Customization Create Charms Bar Shortcut in Windows 10
How to Create a Charms Bar Shortcut in Windows 10 This tutorial no longer works starting with Windows 10 build 9926 released on January 23rd 2015. Settings is now a separate app. Windows 10 has the Settings, Devices, Start, Share, and...
Tutorials
Shortcut Windows + E
Hi! Sorry if this has been covered before, I could not find a topic to do with it in the Search function. While Using Windows 8 I got used to using many of the Windows shortcuts, Win + R etc which I think I did because I didn't fully get on...
General Support
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 11:52.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums