Sleep Shortcut

ByLine
How to Create a Sleep Shortcut on the Desktop in Vista
Synopsis
This will show you how to create a Sleep shortcut used to put your computer into sleep (not hibernate) mode when clicked on.
How to Create a Sleep Shortcut on the Desktop in Vista

information   Information
This will show you how to create a Sleep shortcut used to put your computer into sleep (not hibernate) mode when clicked on.
Note   Note
If you would like to place this shortcut in Quick Launch, then see Option Three in this link for how: How to Use Quick Launch in Vista
Tip   Tip
If you would like to create a keyboard shortcut for this shortcut, then see: How to Create a Keyboard Shortcut for a Program in Vista
warning   Warning
This shortcut will perform the same action set for the Start Menu power button when pressed. You will need to make sure that the Start Menu power button is set for Sleep if you want this shortcut to put your computer to sleep when used. For how, see: How to Change the Power Button Settings for the Start Menu and Case in Vista



Here's How:
1. Click on the download button below to download the Sleep Shortcut.zip file.​
2. Click on Save and save it to the Desktop.​
download

3. Right click on the Sleep Shortcut.zip (on desktop) and click on Open.​
4. Click on Allow for UAC prompt.​
5. Select and extract both the Sleep shortcut and Sleep Shortcut Folder to the desktop.​
6. Open a Windows Explorer window and navigate to C:\Program Files.​
NOTE: Not in the C:\Programs Files (x86) folder for 64 bit Vista users.
7. Right click on the Sleep Shortcut folder (on desktop) and click Cut, then right click on a empty space in the Windows Explorer window (step 6) and click Paste.
Note   Note
The Sleep Shortcut folder has the Sleep.vbs scipt file in it. This is the contents of this vbs script:
Code:
Dim objShell[/INDENT][/INDENT]
[INDENT][INDENT]Set objShell = CreateObject("Shell.Application")[/INDENT][/INDENT]
[INDENT][INDENT]objShell.ShutdownWindows[/INDENT][/INDENT]
[INDENT][INDENT]set objShell = nothing[/INDENT][/INDENT]
[INDENT][INDENT]Set WshShell = CreateObject("WScript.Shell")[/INDENT][/INDENT]
[INDENT][INDENT]WshShell.SendKeys "{Enter}"[/INDENT][/INDENT]
[INDENT][INDENT]Set WshShell = Nothing
A) Click on Continue in the Destination Folder Access Denied prompt.​
B) Click on Continue in the UAC Prompt.​

8. Put the Sleep shortcut (on desktop) where you would like for easy use. (See the NOTE at the top of the tutorial)
NOTE: If you would like to use a icon of your own instead, then see: How to Change a Shortcut Folder or File Icon in Vista for how.​
9. You can now delete the Sleep Shortcut.zip (on desktop) file if you like.​
warning   Warning
This shortcut will perform the same action set for the Start Menu power button when pressed. You will need to make sure that the Start Menu power button is set for Sleep if you want this shortcut to put your computer to sleep when used. For how, see: How to Change the Power Button Settings for the Start Menu and Case in Vista
warning   Warning


That's it,
Shawn

CREDIT TO: sidney1st for providing a better way to do this with a VBS script.
Thank you.


 
Last edited by a moderator:
Shawn Brink

Comments

This isn't the same sleep that Vista has on the Windows button/menu. Anyone have any way to shortcut the shallower sleep that Vista uses?
 
Hi Spinedoc,

Welcome to Vista Forums. :party:

This shortcut is for putting the computer to Sleep, not hibernate or hybrid. It is the same as the normal lighter sleep mode for when you click on Sleep in the Start menu. :geek:

Shawn
 
Thanks Brink. The shortcut on the windows start button menu for "Sleep" puts the computer in a very light sleep mode where I can press the keyboard or move the mouse and it wakes it up, it won't shut down firefox for example. Your Sleep shortcut puts it into some kind of deeper sleep where windows asks to shut down firefox and other programs, and it won't wake up with keyboard or mouse movement.

I would love to get a shortcut to the Sleep that is on the windows start menu.
 
Hi,
You do not have light sleep mode, you have just one sleep mode which is called Sleep!
Then if you want a deeper sleep mode, it is called "hibernation".
And to finish, you have the super sleep-hibernation-top mode which is called "Shutdown" ;)
 
Hi,
You do not have light sleep mode, you have just one sleep mode which is called Sleep!
Then if you want a deeper sleep mode, it is called "hibernation".
And to finish, you have the super sleep-hibernation-top mode which is called "Shutdown" ;)
If that's the case then Brinks shortcut is to hibernate. If I press windows menu button then sleep, the PC sleeps unless you type on the keyboard or move the mouse. If I use Brinks shortcut it will only power back on if I press the power button. Additionally sleeping thru windows doesn't force me to shut down programs, Brinks shortcut does.

So while I agree with you that there is only Sleep and Hibernation, it seems that Brinks shortcut is to hibernate and not sleep.
 
Additionally sleeping thru windows doesn't force me to shut down programs, Brinks shortcut does.

So while I agree with you that there is only Sleep and Hibernation, it seems that Brinks shortcut is to hibernate and not sleep.
Both sleep and hibernate do not shut down programs, they allow to restart the machine exactly in the state it was before going in either mode.
The difference is only the way the "state" of the machine is saved.
In sleep mode it is saved in the RAM, in hibernate mode it is saved on the disk, which will allow you for example to unplug your machine.
If you use the hybrid mode, it is saved in RAM and on the disk.
To shut down programs you have to shut down the computer.
 
Ok, let me put this a bit simpler. When I use Brinks sleep shortcut windows wants to, for example, shut off firefox. Additionally when I use Brinks sleep shortcut windows will not start up again with a keyboard press or a mouse movement.

I understand you have an overwhelming desire to educate me on sleep versus hibernate. ;) But I'm not arguing that, I'm only asking if it's possible to have a shortcut for the sleep mode on the windows menu that does EXACTLY what the sleep button on the windows menu does (which is specifically to not close programs and to restart windows when I move my mouse/keyboard).

Although maybe, for some odd reason, the sleep on my menu functions differently or there is a setting that is changed? Or is there some issue with Brinks shortcut and my PC, is it not supposed to act like this? Maybe there is some kind of conflict.


Additionally sleeping thru windows doesn't force me to shut down programs, Brinks shortcut does.

So while I agree with you that there is only Sleep and Hibernation, it seems that Brinks shortcut is to hibernate and not sleep.
Both sleep and hibernate do not shut down programs, they allow to restart the machine exactly in the state it was before going in either mode.
The difference is only the way the "state" of the machine is saved.
In sleep mode it is saved in the RAM, in hibernate mode it is saved on the disk, which will allow you for example to unplug your machine.
If you use the hybrid mode, it is saved in RAM and on the disk.
To shut down programs you have to shut down the computer.
 
Yes of course, but in that case you cannot go in hibernate mode which is IMHO a problem.

I googled a bit and did not found anything for the "real" sleep mode for Vista, so i made a small vbscript which maybe can work on all computers (i do not know as i made it in 2 minutes and works here), pls try it and let me know.
Tried this one too, same thing. Windows asks me if I want to shut down firefox (only program tested so far), I get the hard disk churning then it all shuts down. It will only start up again with a press of the power button.

Somehow I think both of these programs are hibernating my PC, I'm not sure why.
 
Strange. I tested the shortcut with IE7 and Firefox running when I used it and my computer went to sleep and awoke when I moved the mouse or pressed a key on the keyboard. :confused:

When you click on Sleep in the Start menu, do you get the same behavior as you see with the shortcut, or does it behave like it should as I described above?

Shawn
 
I just downloaded and installed the Sleep Shortcut. When I tried it, I had to use the power button to resume from sleep. But then as an experiment, I typed in the command POWERCFG -H OFF (to turn off hibernation) and used the Sleep Shortcut. I could then resume from sleep by pressing a key on the keyboard. So maybe it has something to do with the computer's hibernate configuration.
 
Hello everyone, pleased to meet you all.
I think Brink’s shortcut behaves how you have the ‘Start Menu Power button’ configured. Through the ‘Control panel, Power Options, Change advanced power settings, Change settings that are currently unavailable, Power buttons and lid’ option.
Btw. Great site everyone, I keep on coming back and learn things here. Keep up the Good work !! :)
 
Hello Flo-TLSC, and welcome to Vista Forums.

Thank you for providing the missing link to why people were having problems with the shortcut. I can confirm that the shortcut performs the action of whatever the Start Menu power button is set as.

Thank you again,
Shawn
 
My computer goes into a hibernation and powers off but it does not ask to close anything and when I press start button every thing comes back on including Firefox, although it does take me to the welcome screen where my user profile is shown as locked but I just click on my pic and every thing is as I left it.

Also I have my power button set to shut down.:sarc:

I still like this shortcut so thanks anyway Brink!!... plus its saves power and you don't need to reboot :D
 
LOL Mr GRiM,

Just when we thought we had it nailed down. ;)

Strange, but I did have hibernation disabled though when I tested the Start menu power button with Sleep and Shutdown.
 
Sorry Brink, I just downloaded your shortcut again as I was not totally sure if it was the same one, as I think I had a look at your thread a while ago but then used a different shortcut. Anyway you are totally correct and this shortcut does duplicate whatever your main button is set to do in the start menu, when tested again it shut down completely the same as I have it set to do.

Here is the target for the shortcut that I was using:
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState
Start in: "%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState"

Sorry again for the confusion
 
Hey all..

Question about this old thread. I've got the Sleep shortcut on my desktop and it works fine when I just double-click it. Goes right to sleep.

However, if I have Task Scheduler run it at a particular time, it pops up the regular logoff prompt with the pulldown menu (Sleep, Shut Down, etc.) and waits for my response.

Any ideas on that? It happens on both of my Vista PCs. Both power buttons are configured to sleep.

Thanks..

Adam
 
Top