Sleep Shortcut

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.


 

Attachments

  • Sleep Shortcut.zip
    Sleep Shortcut.zip
    915 bytes · Views: 12,064
  • thumb_12193261050Sleep.png
    thumb_12193261050Sleep.png
    13.2 KB · Views: 979
Last edited by a moderator:
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?
 

My Computer

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
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
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.
 

My Computer

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" ;)
 

My Computer

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.
 

My Computer

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.
 

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

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

My Computer

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
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
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.
 

My Computer

Brink they are right I tried it to it asked me to close firefox i got the option save and quit etc and then it says windows is shutting down and i have to power back on from the computer...so technically it is shutdown not sleep.

Good tut but for the people it didn't work for try this!

http://www.vistax64.com/tutorials/175897-sleep-shortcut-simplified.html

thanks for the help brink
 

My Computer

System One

  • CPU
    Intel Core 2 Duo E6400
    Motherboard
    Intel DG965WH
    Memory
    3 Gigs
    Graphics card(s)
    PNY Nvidia 9800GTX
    Hard Drives
    Exelstar 160 GB 7200 spin rate Serial ATA (SATA)
No problem Isikh.

Thanks for the addition.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
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 !! :)
 

My Computer

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 Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
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
 

My Computer

System One

  • Manufacturer/Model
    HOME BREW
    CPU
    Core 2 E8500 3.16Ghz @ 4.05Ghz
    Motherboard
    EVGA NVIDIA NFORCE 750i SLI FTW
    Memory
    2x2Gb Patriot PC2-6400 LL
    Graphics card(s)
    Inno3D GeForce GTX260 216 SP
    Monitor(s) Displays
    ASUS VW222U 22" 2ms Response time
    Screen Resolution
    1680x1050
    Hard Drives
    SATA 150GB SATA II 250GB USB IDE 300GB Ext.
    PSU
    HYTEC 600W & Thermaltake Toughpower Power Express 650W
    Case
    Thermaltake Armor LCS (Liquid Cooling System)
    Cooling
    Liquid Cooling System
    Mouse
    Logitech G9 Gaming Mouse
    Keyboard
    Logitech G15 Gaming Keyboard
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.
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
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
 

My Computer

System One

  • Manufacturer/Model
    HOME BREW
    CPU
    Core 2 E8500 3.16Ghz @ 4.05Ghz
    Motherboard
    EVGA NVIDIA NFORCE 750i SLI FTW
    Memory
    2x2Gb Patriot PC2-6400 LL
    Graphics card(s)
    Inno3D GeForce GTX260 216 SP
    Monitor(s) Displays
    ASUS VW222U 22" 2ms Response time
    Screen Resolution
    1680x1050
    Hard Drives
    SATA 150GB SATA II 250GB USB IDE 300GB Ext.
    PSU
    HYTEC 600W & Thermaltake Toughpower Power Express 650W
    Case
    Thermaltake Armor LCS (Liquid Cooling System)
    Cooling
    Liquid Cooling System
    Mouse
    Logitech G9 Gaming Mouse
    Keyboard
    Logitech G15 Gaming Keyboard
LOL, ok Mr GRiM.

Thank you for confirming it again. ;) LOL
 

My Computers

System One System Two

  • Operating System
    Windows 10 Pro 64-bit
    Manufacturer/Model
    Custom
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2, 4TB Samsung 990 PRO PRO M.2, 8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Mouse
    Logitech MX Master 3
    Keyboard
    Logitech wireless K800
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Other Info
    Logitech Z625 speaker system, Logitech BRIO 4K Pro webcam, HP Color LaserJet Pro MFP M477fdn, APC SMART-UPS RT 1000 XL - SURT1000XLI, Galaxy S23 Plus phone
  • Operating System
    Windows 10 Pro
    Manufacturer/Model
    HP Envy Y0F94AV
    CPU
    i7-7500U @ 2.70 GHz
    Memory
    16 GB DDR4-2133
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    17.3" UHD IPS touch
    Screen Resolution
    3480 x 2160
    Hard Drives
    512 GB M.2 SSD
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
 

My Computer

Back
Top