Windows 8 and 8.1 Forums


Create Sleep button shortcut on desktop

  1. #1


    Posts : 14
    Win 8.1

    Create Sleep button shortcut on desktop


    I am glad I found this site!
    Brink has created all kinds of cool desktop shortcuts for 8.1

    There is one that I hope he can help me with.

    I have created a shutdown shortcut on my Win 8.1 tablet that works nicely (thanks to Brink).

    My tablet has a physical button on the side that is used to put the tablet into instant sleep mode.
    You press the button and the tablet immediately turns off (goes to sleep).
    You press the button again and the tablet immediately turns on again (comes out of sleep).

    I would like to create a shortcut on my desktop (NOT the Metro start screen) that will function the same way the
    physical button does, that is, the tablet will immediately turn off (goes to sleep).

    Someone posted something close, but not quite the same thing; ....powrprof.dll.SetSuspendState Sleep
    When I create a shortcut with the above code the tablet actually *shuts down*.
    I know this because when I press the power button the tablet goes through the cold start up routine.

    I would like the shortcut to do EXACTLY the same thing that happens when I press the power button on the tablet; go *immediately* into sleep. And pressing the power button after that should turn the tablet *immediately* back on.

    Thanks!

      My System SpecsSystem Spec

  2. #2


    Harrisonburg, Va.
    Posts : 10,488
    Windows 8.1.1 Pro with Media Center


    This might be what you want.

    Copy & paste this into Notepad & choose All files & save it as sleep.bat.

    C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0

    Save it to your Desktop.

    Left click it to sleep.
    Press power button to come out of sleep.

    I have tested it on my computer & it works for me.


    edit--- See video on notepad---

      My System SpecsSystem Spec

  3. #3


    Posts : 22,577
    64-bit Windows 10
      My System SpecsSystem Spec

  4. #4


    Posts : 14
    Win 8.1


    Quote Originally Posted by David Bailey View Post
    This might be what you want.

    Copy & paste this into Notepad & choose All files & save it as sleep.bat.

    C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0

    Save it to your Desktop.

    Left click it to sleep.
    Press power button to come out of sleep.

    I have tested it on my computer & it works for me.
    Thanks David for helping out, I really appreciate it!

    It comes close, but not quite what I am looking for.

    I had already tried creating two desktop shortcuts with the following code:

    C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState
    C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState Sleep


    Your code had the exact same effect as the code above.

    Namely, when the code is run, the tablet does turn off immediately, but two things happen after that which are not desired.

    1. When the tablet turns off a white light comes on briefly at the top of the tablet. When this happens I know it's a bad sign. (When I press the power button on the tablet to turn it off, the light does not come on).
    When the tablet does a complete shutdown this white light comes on as well.

    2. When I press the power button to turn the tablet back on, it goes through *half* of the boot procedure.
    The manufacturer logo is presented and a moving circle shows below it. (This is not desired)
    No screen lock or login screen shows (as I have disabled them).

    A full boot procedure takes even longer and gives the following:
    - same light blinks at top, but several times
    - welcome screen presented
    - then desktop arrives

    What I am looking for is a desktop shortcut that will perform *exactly* the same way as when I press the power button on the tablet.
    That is; the machine turns off *immediately*, there is no flashing light (a bad sign).

    The acid test comes when I press the power button again. If it went into sleep mode correctly, when the button is pressed the screen will turn on immediately and I will see the desktop immediately.

    I hope this is clear.
      My System SpecsSystem Spec

  5. #5


    Posts : 835
    Win 8.1 Pro


    Sleep works in this way.
    The system stays powered on in a very very low power state
    The power light will stay on and blink signifying that it is in sleep mode, this is not a bad thing, it's the way it works.

    Hibernate - will shut the system down and load everything in RAM to the hiberfile.sys file
    When you power it on, will go through a half boot and load everything from the hiberfile back into RAM
    No lights should be on.


    Carefully read the link that Brink posted, it is what you are looking for.
      My System SpecsSystem Spec

  6. #6


    Posts : 14
    Win 8.1


    Quote Originally Posted by Tepid View Post
    Sleep works in this way.
    The system stays powered on in a very very low power state
    The power light will stay on and blink signifying that it is in sleep mode, this is not a bad thing, it's the way it works.

    Hibernate - will shut the system down and load everything in RAM to the hiberfile.sys file
    When you power it on, will go through a half boot and load everything from the hiberfile back into RAM
    No lights should be on.


    Carefully read the link that Brink posted, it is what you are looking for.
    Thanks Tepid for helping out!

    I want to first assure you that I am doing a ton of research on this while I await answers on this forum!

    There is some confusion on your part concerning the light that I mentioned.

    I am using a Dell Venue Pro 8.
    When the power button is pressed on the side of the unit, it puts the unit into sleep mode.
    It immediately goes into sleep mode and NO light appears at the top of the unit.

    The light is next to the camera on the top face of the unit. This is NOT a typical power type of light that flashes when a computer goes into sleep/hibernation. It is *completely* different.

    Not seeing the light is a GOOD thing. It tells me it is going into proper sleep mode.

    When I use the code I described earlier, the tablet is actually going into hibernation mode and the light flashes once before going into hibernation. It is a bad thing. As soon as I see it flash (it only flashes once for a split second) I know that when I hit the power button the unit will come back from *hibernation* mode, not sleep mode. This takes much more time.

    I hope this is clear now.

    I read Brink's post carefully. Unfortunately it does not work on my tablet.
      My System SpecsSystem Spec

  7. #7


    Posts : 14
    Win 8.1


    Quote Originally Posted by Brink View Post
    Thanks Brink.
    I hope that ultimately you will be able to help me solve my problem.

    I know you have lots of experience with programming etc.

    The link you gave is four years old and the commands are different on different systems.

    For example, at the top of the page you state:
    Set your Start Menu power button to Sleep. (see screenshot below)

    The screenshot you gave has Taskbar and Start Menu Properties and below that:
    Taskbar / Start Menu/ Toolbars

    Unfortunately on my Dell Venue Pro 8 (Win 8.1)
    there is no Start Menu there, just Taskbar / Toolbars

    This is just one example of where things are different.
    Various sleep commands that you gave also did not work as expected on my system.
      My System SpecsSystem Spec

  8. #8


    Posts : 14
    Win 8.1


    OK I really believe I am on my way to a solution. I just need a tiny bit of expert help here, that's all.

    Can someone please tell me the command line code that I can place into a desktop shortcut that will result in the same thing as if I went into:

    Settings/Power and pressed Sleep.
    That's all I need!!!

    I have desktop shortcuts with command lines to:
    -shutdown my computer
    -put it into hibernation
    -restart my computer

    All I need is one that will do the same as if I did a Settings/Power/Sleep

    Surely there must be a command for this?

    (Please bear in mind that I have already tried the standard command code as outlined earlier in this post, which didn't work).
      My System SpecsSystem Spec

  9. #9


    Posts : 22,577
    64-bit Windows 10


    The problem with a sleep shortcut is that if you have hibernate enable, the sleep shortcut will hibernate instead of sleep. You'll have to have hibernate disabled to have a sleep shortcut.




    In case you didn't know, you could also use the WIN+X menu for all these power options.

    Power User Tasks Menu - Open in Windows 8
      My System SpecsSystem Spec

  10. #10


    Posts : 14
    Win 8.1


    Quote Originally Posted by Brink View Post
    The problem with a sleep shortcut is that if you have hibernate enable, the sleep shortcut will hibernate instead of sleep. You'll have to have hibernate disabled to have a sleep shortcut.




    In case you didn't know, you could also use the WIN+X menu for all these power options.

    Power User Tasks Menu - Open in Windows 8

    Thanks Brink.
    re: having to disbale/enable hibernate etc.
    Been there, done that.

    Disabling hibernate is NOT the solution, unfortunately. I tried it many times this evening.

    With hibernate disabled, running the code to put the tablet to sleep (code earlier in my post) does NOTHING.
    With hibernate enabled, running the code to put the tablet to sleep (code earlier in my post) puts the tablet in hibernation.

    The Win+X menu is not an option for me.
    I am using a Dell Venue Pro 8. There is no keyboard with the device (which is why I bought it).

    Thanks again for trying!
      My System SpecsSystem Spec

Page 1 of 3 123 LastLast
Create Sleep button shortcut on desktop
Related Threads
Show/hide desktop icons with a button or shortcut. Is there a way of doing this in Win8.1?
Hi every body I have installed windows 8 just now but there is a big problem for me. I have no sleep button and property in my PC. Look the following photo : 37344 As you see there is no sleep. Do I have do anything to bring it to my PC? I searched the net but I couldn't find the...
How to Create a Power and Sleep PC Settings Shortcut in Windows 8.1 Power and Sleep in PC settings is where you can manage adaptive brightness, turn off the display, and sleep after. This tutorial will show you how to create or download a Power and Sleep shortcut that opens directly to PC...
Hello, Background: Windows 8, HP destop, 4 cores Intel Suddenly few days ago the link for SENDTO DESKTOP evaporated, along with its icon (from imageres: a bluish monitor screen) So I followed the this procedures both manually and using the ready fix Zip folder provided foer Win7. By using...
Hi, I'm new to the forum, and fairly new to Windows 8, which I've been using from the desktop as I can't get on with the Start menu and its tiles. Not using Start8. Anyway, I was using the desktop taskbar with its Start button and Show desktop button and today they have both disappeared. How...
How can I create a simple shortcut to a WEB page? Pretty easy in Win 7. Copy the URL, right click desktop, select new, shortcut, etc... but where is that EASE of use in Win 8? Thanks
How to Create a "Run" Command Dialog Box Shortcut in Windows 8 This tutorial will show how to create or download a Run shortcut that opens directly to the Run command dialog box on your desktop in Windows 8. The default keyboard shortcut to open the "Run" command dialog box is: Windows + R ...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook