Hibernate Shortcut - Create

How to Create a Hibernate Shortcut in Windows

   Information
This tutorial will show you how to create a shortcut for Hibernation on the desktop. This can then be moved anywhere you like.
   Warning
You will need to enable hibernate for this hibernate shortcut to work. Otherwise it will put your computer to sleep instead.





Step 1: Right click on the desktop and select New -> Shortcut
picture.php

Step 2: Type this into the location field:
C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0


picture.php

Step 3: Name it whatever you would like:
picture.php

You now have your Hibernation shortcut!


Step 4 (optional): Change the icon to something meaningful. Right click on the shortcut, and select Properties. In the Shortcut tab, choose "Change Icon". You can use the default icons in there, or choose from the power icons by clicking browse, and typing this:

%SystemRoot%\System32\powrprof.dll


Step 5: Enable hibernate.


All done!
~Lordbob








 
Last edited by a moderator:
You could do the same for them as well. You'll just need to substitute the bottom command for the .bat file below for the one you want instead.

The message displayed by the echo command can be anything you like to help know what it it's for, etc...

Code:
@echo off
echo [B][COLOR=#ff0000]Your message here[/COLOR][/B]
timeout /t 30 /nobreak
[B][COLOR=red]shutdown -h -f[/COLOR][/B]

I'm not sure how to have the abort command work using this method though, but luckily it gives you the option to abort during the prompt.
 
Last edited:

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
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,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
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
The message displayed by the echo command can be anything you like to help know what it it's for, etc...
I get a double message display per attached. How to have single? I also don't need to see the path/timeout ...
 

Attachments

  • Hib.png
    Hib.png
    34 KB · Views: 524

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP (HP-P6212F)
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
Motherboard
PEGATRON CORPORATION Benicia
Memory
6.00 GB
Graphics Card(s)
Intel(R) G33/G31 Express Chipset Family
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
24'' HP WS LCD
Screen Resolution
1920 x 1080 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
(1) ATA Hitachi HDT72106 SCSI Disk Device (2) Generic- Compact Flash USB Device (3) Generic- MS/MS-Pro USB Device (4) Generic- SD/MMC USB Device (5) Generic- SM/xD-Picture USB Device (6) Verbatim STORE N GO USB Device
Keyboard
Logitech G510s
Mouse
Logitech Trackball M570
Antivirus
Microsoft Security Essentials / Malwarebytes
Browser
IE / Firefox / Chrome
It needs a @echo off as the first statement.

Code:
@echo off
echo HIBERNATE
timeout /t 30 /nobreak
shutdown -h -f
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
home built
OS
Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
CPU
AMD Athlon II x4 620
Motherboard
Gigabyte GA-MA785G-UD3H
Memory
6GB GSkill DDR2 800
Graphics Card(s)
AMD 4670 GPU + AMD 4200 IGP
Sound Card
on board Realtek ALC889A
Monitor(s) Displays
RCA 40" LCD TV, Insignia 32" LCD TV, HP 15" LCD monitor
Screen Resolution
1680 x 1050
Hard Drives
OCZ Vertex 3 120GB,
Samsung F3 1TB (3),
Several others - WD, Seagate, Hitachi, ...
PSU
Corsair 500 W
Case
Rosewill mid tower
Cooling
CM 90mm rifle
Keyboard
Gyration wireless, Logitech wireless, Dell USB wired
Mouse
Gyration wireless, Logitech wireless, V7 USB wired
Internet Speed
Spectrum - 100Mbps D / 10Mbps U
Antivirus
Avast, MBAM3, EMET, WinPatrol
Browser
Pale Moon, Firefox, IE
Other Info
2 multi-boot PC's
Mainly HTPC/Office/Gen purpose (no gaming).
Trendnet USB KVM.
LG DVD burner/Blue Ray Player.
Tray system for removable SATA backup drives.

Not currently OCd, under-volted.
I use Hybrid sleep, rarely re-boot or shutdown.

Hauppauge HD-PVR, Avermedia PCIe TV Tuner, Hauppauge PCI TV Tuner.
It needs a @echo off as the first statement.
Yep! - that's what it needed, thank you DavidE.

Shawn, thank you for all your help. I think I will keep my 'abort' button around for a while. However, that countdown cmd prompt is really drawing me in.

oh, and thx to Lordbob75 for this great tutorial,

-take care all!
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP (HP-P6212F)
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
Motherboard
PEGATRON CORPORATION Benicia
Memory
6.00 GB
Graphics Card(s)
Intel(R) G33/G31 Express Chipset Family
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
24'' HP WS LCD
Screen Resolution
1920 x 1080 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
(1) ATA Hitachi HDT72106 SCSI Disk Device (2) Generic- Compact Flash USB Device (3) Generic- MS/MS-Pro USB Device (4) Generic- SD/MMC USB Device (5) Generic- SM/xD-Picture USB Device (6) Verbatim STORE N GO USB Device
Keyboard
Logitech G510s
Mouse
Logitech Trackball M570
Antivirus
Microsoft Security Essentials / Malwarebytes
Browser
IE / Firefox / Chrome
You could do the same for them as well. You'll just need to substitute the bottom command for the .bat file below for the one you want instead.

The message displayed by the echo command can be anything you like to help know what it it's for, etc...

Code:
@echo off
echo Your message here
timeout /t 30 /nobreak
shutdown -h -f

...
I'M BACK - heh, heh,

I decided to go the .bat file/shortcut route for Restart and Shutdown and I have followed your examples to the letter. HOWEVER - after the command window 30 second countdown is complete it closes and a new window/pop-up appears (attached ) and a new 30 second countdown begins. How do I stop the 2nd pop-up? -thx

my bat files :

@echo off
echo RESTART
timeout /t 30 /nobreak
shutdown -r -f

@echo off
echo SHUTDOWN
timeout /t 30 /nobreak
shutdown -s -f
 

Attachments

  • sd1-1.png
    sd1-1.png
    25.5 KB · Views: 527

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP (HP-P6212F)
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
Motherboard
PEGATRON CORPORATION Benicia
Memory
6.00 GB
Graphics Card(s)
Intel(R) G33/G31 Express Chipset Family
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
24'' HP WS LCD
Screen Resolution
1920 x 1080 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
(1) ATA Hitachi HDT72106 SCSI Disk Device (2) Generic- Compact Flash USB Device (3) Generic- MS/MS-Pro USB Device (4) Generic- SD/MMC USB Device (5) Generic- SM/xD-Picture USB Device (6) Verbatim STORE N GO USB Device
Keyboard
Logitech G510s
Mouse
Logitech Trackball M570
Antivirus
Microsoft Security Essentials / Malwarebytes
Browser
IE / Firefox / Chrome
You can do that by changing the last command to do the action immediately after the timeout. :)

Code:
@echo off
echo RESTART
timeout /t 30 /nobreak
shutdown -r -f -t 00


Code:
@echo off
echo SHUTDOWN
timeout /t 30 /nobreak
shutdown -s -f -t 00
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
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,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
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
^
YES! - thx for the fix Shawn, adios ...
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
HP (HP-P6212F)
OS
Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
CPU
Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
Motherboard
PEGATRON CORPORATION Benicia
Memory
6.00 GB
Graphics Card(s)
Intel(R) G33/G31 Express Chipset Family
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
24'' HP WS LCD
Screen Resolution
1920 x 1080 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
(1) ATA Hitachi HDT72106 SCSI Disk Device (2) Generic- Compact Flash USB Device (3) Generic- MS/MS-Pro USB Device (4) Generic- SD/MMC USB Device (5) Generic- SM/xD-Picture USB Device (6) Verbatim STORE N GO USB Device
Keyboard
Logitech G510s
Mouse
Logitech Trackball M570
Antivirus
Microsoft Security Essentials / Malwarebytes
Browser
IE / Firefox / Chrome
You're most welcome. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
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,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
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
Back
Top