Is there any way to make a desktop shortcut for the sleep command?

Anonymous
2009-01-10T03:57:52+00:00

Desktop shortcut for the sleep command?

Is there any way to make a desktop shortcut for the sleep command? I can't find the actual location that the sleep button on the start menu points to. It has to point somewhere! Please, if anyone knows how i can create this shortcut, help!!! Thanks a bunch!

Windows for home | Previous Windows versions | Accessibility

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2009-01-10T12:18:27+00:00

Tar-ter,

To create a shortcut that will execute the sleep command in Vista:

  • Right Click in the desired location (On the Desktop or in a folder)
  • Select New -> Shortcut
  • In the “Type the location of the item” field enter the following
  • Rundll32.exe Powrprof.dll,SetSuspendState Sleep
  • Click Next
  • This will create a shortcut with the name rundll32,
  • Right Click the shortcut, select Rename and type in Sleep

**** You can now open this shortcut whenever you desire to put your computer into sleep mode.

Note: You can replace the default icon with a Shutdown one by:

  • Right Click the created shortcut, select Properties -> Change Icon
  • Navigate to this link in the **“**Look for icons in this file:” field:
  • %SystemRoot%\system32\SHELL32.dll icons
  • Find the desired icon.
  • Click Ok.

Thank you for using the Microsoft Vista Support Community.


Rami

Microsoft Answers Support Engineer

Visit our Microsoft Answers Feedback Forum and let us know what you think.

Was this answer helpful?

60+ people found this answer helpful.
0 comments No comments

73 additional answers

Sort by: Oldest
  1. Anonymous
    2010-11-18T09:22:26+00:00

    Ooooh, so close.  'Made the bat file.  Works great as admin.  Is there any way I can run this bat file with a shortcut from my personal account desktop without having to enter my admin password?  Having to do that is way more hassle than finding the keyboard "fn" + "f4" combo I am now forced to find.  Is there any "wish list" inbox for the current Windows somewhere in the Microsoft Monster?  It sure would be nice if this simple convenience was an option for your desktop in Win7.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-12-21T02:57:35+00:00

    Create a batch file with the following:

    @echo off

    powercfg -h off

    rundll32.exe powrprof.dll,SetSuspendState 0,1,0

    powercfg -h on

    Then create the desktop shortcut and use the Browse to point to the batch file you created. Works perfectly.

    It's work perfectly, if you run as administrator.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-01-09T01:51:50+00:00

    This might work. Create a shortcut for Surlock's batch file. Right click the shortcut and select Properties. On the Shortcut tab, click Advanced. There select Run as Administrator.

    You will have to do this as an admin, or even as an owner of the file. IIUC, this gives any user the right to fire this particular batch. I'm an admin here, so I can't test it out. Would appreciate feedback.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-01-13T03:32:46+00:00

    Dear All,

    I created the batch file and it works fine, however, one thing I cannot understand is that under sleep mode, when I swtiched on the lamp in the room (not touching any key/mouse on the PC), it wakes up automatically. Why? any solution to this strange problem. Thanks.

    Was this answer helpful?

    0 comments No comments