Timed Shortcut for sleep/hibernation?

SoulPursuer

New member
Member
Local time
9:14 AM
Messages
29
Location
UK
Hi, so I have 10,000msecond(2.7hour) shortcut to shutdown my computer ("C:\Windows\System32\shutdown.exe -s -t 10000") which i use for watching films before bed, just encase i sleep half way through but I was wondering if there was a way to make a similar shortcut but instead of making your computer shutdown in a few hours make it sleep in a few hours time.

Now I know how to make a sleep shortcut but that makes the computer sleep instantly, and putting "-t 10000" at the end of "C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0" doesnt work. Apparently their is a way to do it if you install some software but I don't want that.

Anyone know if its possible with just windows command shotcuts?
 

My Computer My Computer

At a glance

Windows 7 Home (x64)Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x88.00 GB of DDR3 RAMNvidia 560 ti
Computer Manufacturer/Model Number
Studio XPS Desktop 435MT
OS
Windows 7 Home (x64)
CPU
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x8
Memory
8.00 GB of DDR3 RAM
Graphics Card(s)
Nvidia 560 ti
Monitor(s) Displays
Dell ST2210 (analog) x2
Screen Resolution
1920x1080
Hard Drives
240GB SSD
500GB HDD
1TB external
1.5TB external
300GB pprtable
PSU
750w
Cooling
Fan Based
Keyboard
Sidewinder
Mouse
Noxus
Internet Speed
10megabits download, 1megabit upload
I have no ideal how to do this, wasn't even aware you could, but that's an interesting scenero.

Be interesting to see what solutions are posted.
 

My Computer My Computer

At a glance

Windows 10 ProIntel Core i7-4770K (3.5Ghz)32 gig Corsair Dominator Platinum (4x8Gig)Sapphire Tri-X R9 Fury
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom built by me.
OS
Windows 10 Pro
CPU
Intel Core i7-4770K (3.5Ghz)
Motherboard
Gigabyte G1 Sniper 5 (F10 Bios)
Memory
32 gig Corsair Dominator Platinum (4x8Gig)
Graphics Card(s)
Sapphire Tri-X R9 Fury
Sound Card
Soundblaster ZXR
Monitor(s) Displays
NEC PA242W 24" LCD Monitor
Screen Resolution
1920 x 1200
Hard Drives
Primary - Samsung 850 Pro (512gig), Samsung 840 Pro (256gig), 2TB WD Caviar Black.
PSU
EVGA Supernova 1000 G2
Case
Cooler Master HAF X
Cooling
Corsair H100i with Corsair Air Series SP120 Quiet Fans
Keyboard
Logitech Wireless Wave
Mouse
Logitech Performance MX
Internet Speed
High Speed Cable
Antivirus
Norton Security
Browser
IE11
Other Info
Memory Timings - 1866MHz @ 9-9-9-27-1T @ 1.5 volts
should work as you posted.... but you will need to disable Hybrid Sleep in Advanced Power options first
 

My Computer My Computer

At a glance

Windows 10 Pro x64Intel Core i5 7400 @ 3.00GHz8GB 2133Mhz DDR4 (OEM supplied)Gygabyte Windforce GTX 1050Ti (Factory Overcl...
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Medion Erazer (note to self: insert model number) - with custom additions
OS
Windows 10 Pro x64
CPU
Intel Core i5 7400 @ 3.00GHz
Motherboard
OEM supllied with PC
Memory
8GB 2133Mhz DDR4 (OEM supplied)
Graphics Card(s)
Gygabyte Windforce GTX 1050Ti (Factory Overclocked)
Sound Card
Realtek
Monitor(s) Displays
Acer Al1980 + HKC
Screen Resolution
1360*768(HKC) / 1280*1024(Acer)
Hard Drives
1TB Toshiba
1TB WD Caviar Green
120GB Samsung Evo 840
PSU
OEM supplied (no power rating on case)
Case
OEM Supplied
Cooling
Stock
Keyboard
Logitech Wireless
Mouse
Logitect Wireless
Internet Speed
40Mb/s Down 10Mb/s Up
Antivirus
Defender
Browser
Firefox
so putting "C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0" into the shortcut does make it sleep, and putting -t 10000 doesnt make it timed it just does it instantly.

Unless im doing something wrong anyone got any ideas?
 

My Computer My Computer

At a glance

Windows 7 Home (x64)Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x88.00 GB of DDR3 RAMNvidia 560 ti
Computer Manufacturer/Model Number
Studio XPS Desktop 435MT
OS
Windows 7 Home (x64)
CPU
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x8
Memory
8.00 GB of DDR3 RAM
Graphics Card(s)
Nvidia 560 ti
Monitor(s) Displays
Dell ST2210 (analog) x2
Screen Resolution
1920x1080
Hard Drives
240GB SSD
500GB HDD
1TB external
1.5TB external
300GB pprtable
PSU
750w
Cooling
Fan Based
Keyboard
Sidewinder
Mouse
Noxus
Internet Speed
10megabits download, 1megabit upload
Try:
rundll32.exe powrprof.dll,SetSuspendState -t 10000 0,1,0
or removing the 0,1,0 altogether

~Lordbob
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64, Mint 9Intel i5-2500k2x 4Gb Corsair VENGEANCE DDR3-1600NVidia GeForce N260GTX Twin Frozr
Computer Manufacturer/Model Number
Hera
OS
Windows 7 Ultimate x64, Mint 9
CPU
Intel i5-2500k
Motherboard
ASUS P8P67 Pro
Memory
2x 4Gb Corsair VENGEANCE DDR3-1600
Graphics Card(s)
NVidia GeForce N260GTX Twin Frozr
Sound Card
Realtek HD OnBoard Audio
Monitor(s) Displays
ASUS 24" Monitor
Screen Resolution
1920x1080
Hard Drives
G.SKILL Phoenix Series 60GB SATA II MLC Internal Solid State Drive (SSD)
SAMSUNG Spinpoint F3R 1TB 7200 RPM 32MB Cache SATA II
PSU
Cooler Master Real Power Pro 750W
Case
Cooler Master Haf 932
Cooling
Fans
Keyboard
Razer Tarantula
Mouse
Razer Lachesis
Internet Speed
not fast enough
Try:
rundll32.exe powrprof.dll,SetSuspendState -t 10000 0,1,0
or removing the 0,1,0 altogether

~Lordbob


Nope that doesnt work either.
 

My Computer My Computer

At a glance

Windows 7 Home (x64)Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x88.00 GB of DDR3 RAMNvidia 560 ti
Computer Manufacturer/Model Number
Studio XPS Desktop 435MT
OS
Windows 7 Home (x64)
CPU
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x8
Memory
8.00 GB of DDR3 RAM
Graphics Card(s)
Nvidia 560 ti
Monitor(s) Displays
Dell ST2210 (analog) x2
Screen Resolution
1920x1080
Hard Drives
240GB SSD
500GB HDD
1TB external
1.5TB external
300GB pprtable
PSU
750w
Cooling
Fan Based
Keyboard
Sidewinder
Mouse
Noxus
Internet Speed
10megabits download, 1megabit upload
What I'd do is make a .bat file with this line in it:

echo schtasks /CREATE /SC ONCE /TR "C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0" /SD <start-date> /ST <start-time>

Then, say it's tonight around 11pm and you want to put the system to sleep at 1am, then <start-date> would be 6/19/10 and <start-time> would be 01:00.

Just edit the file to reflect whatever times you want, save it, then right click and run as admin to execute it and set up the scheduled task.
 

My Computer My Computer

At a glance

XP / Win7 x64 ProIntel Quad-Core Q9450 @ 3.2GHz2x2GB GSkill DDR2NVIDIA GeForce 8600 GTS (EVGA)
OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
So that looks like it should work going to try it out in a bit but if anyone can find a way to do it without having to put them time in every time that would be awesome.
 

My Computer My Computer

At a glance

Windows 7 Home (x64)Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x88.00 GB of DDR3 RAMNvidia 560 ti
Computer Manufacturer/Model Number
Studio XPS Desktop 435MT
OS
Windows 7 Home (x64)
CPU
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz - x8
Memory
8.00 GB of DDR3 RAM
Graphics Card(s)
Nvidia 560 ti
Monitor(s) Displays
Dell ST2210 (analog) x2
Screen Resolution
1920x1080
Hard Drives
240GB SSD
500GB HDD
1TB external
1.5TB external
300GB pprtable
PSU
750w
Cooling
Fan Based
Keyboard
Sidewinder
Mouse
Noxus
Internet Speed
10megabits download, 1megabit upload
If it is always the same time of day/night you want it to sleep, then you can leave the time the same and omit the date and never have to change it. The problem comes if you want to shut off at 1am (e.g. a different day than current). If you just put 01:00 and no date, it won't run b/c 1am has already passed on the current day.
 

My Computer My Computer

At a glance

XP / Win7 x64 ProIntel Quad-Core Q9450 @ 3.2GHz2x2GB GSkill DDR2NVIDIA GeForce 8600 GTS (EVGA)
OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
Sleep Mode ??

If this: C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0
get my Windows 7 machine to hibernate via a shortcut icon on my desktop,
which it does on both 32- and 64-bit machines, then what gets it to go into "sleep" mode?
 

My Computer My Computer

At a glance

Win 7/Pro 64-bitIntel 6600 Quad8 GB DDR2EVGA 512 9500 GT + nVidia GT
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Homebrew Intel 6600-based
OS
Win 7/Pro 64-bit
CPU
Intel 6600 Quad
Motherboard
eVGA 780i
Memory
8 GB DDR2
Graphics Card(s)
EVGA 512 9500 GT + nVidia GT
Monitor(s) Displays
4: (1) HP 22"W + (2) 19" + (1) 15" (pgm. icons only)
Hard Drives
SanDisk 120GB SSD (sys+pgms);WD Raptor 150GB (sys/pgm backup). Also, two of Seagate Barracuda ES.2's (data + backup)) and WD Raptor 150GB (spare)
Case
Cooler Master CM Cosmose 1000 (tower)
Keyboard
MS Natural (desktop)
Mouse
Logitech Performance Lase Wireless Mouse
Internet Speed
17 Mbs download (cable)
Antivirus
MS Defender
Other Info
Windows Experience Index on tower system: 7.1/7.1/6.9/6.9/7.0
If you go into Power Options and disable hibernation, that command will cause the PC to go into Sleep mode instead.
 

My Computer My Computer

At a glance

XP / Win7 x64 ProIntel Quad-Core Q9450 @ 3.2GHz2x2GB GSkill DDR2NVIDIA GeForce 8600 GTS (EVGA)
OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
What I really want is to have two icons on my desktop: one for hibernate and one for sleep.
 

My Computer My Computer

At a glance

Win 7/Pro 64-bitIntel 6600 Quad8 GB DDR2EVGA 512 9500 GT + nVidia GT
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Homebrew Intel 6600-based
OS
Win 7/Pro 64-bit
CPU
Intel 6600 Quad
Motherboard
eVGA 780i
Memory
8 GB DDR2
Graphics Card(s)
EVGA 512 9500 GT + nVidia GT
Monitor(s) Displays
4: (1) HP 22"W + (2) 19" + (1) 15" (pgm. icons only)
Hard Drives
SanDisk 120GB SSD (sys+pgms);WD Raptor 150GB (sys/pgm backup). Also, two of Seagate Barracuda ES.2's (data + backup)) and WD Raptor 150GB (spare)
Case
Cooler Master CM Cosmose 1000 (tower)
Keyboard
MS Natural (desktop)
Mouse
Logitech Performance Lase Wireless Mouse
Internet Speed
17 Mbs download (cable)
Antivirus
MS Defender
Other Info
Windows Experience Index on tower system: 7.1/7.1/6.9/6.9/7.0
Only thing I can think of is to create two batch files with the following (and make sure you run as admin for both when executing)...

Sleep.bat:

@echo off
powercfg -h off
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
powercfg -h on


Hibernate.bat:

@echo off
powercfg -h on
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
 

My Computer My Computer

At a glance

XP / Win7 x64 ProIntel Quad-Core Q9450 @ 3.2GHz2x2GB GSkill DDR2NVIDIA GeForce 8600 GTS (EVGA)
OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
Last edited by a moderator:

My Computer My Computer

At a glance

W 7 64-bit UltimateIntel Q9550 Yorkfield8GB Dominator 8500C5DATI : XFX 5870
Computer Manufacturer/Model Number
* BFK Customs *
OS
W 7 64-bit Ultimate
CPU
Intel Q9550 Yorkfield
Motherboard
ASUS P5Q Pro
Memory
8GB Dominator 8500C5D
Graphics Card(s)
ATI : XFX 5870
Sound Card
Realtek HD Audio 7-1
Monitor(s) Displays
1x 47" LCD HDMI & 3x 26" LCD HDMI
Screen Resolution
1920x1080P & 1920x1200
Hard Drives
1x 80GB Intel X25-M G2 SSD : 1x 500GB & 1x 640GB WD Caviar Black(s)
PSU
Corsair 620HX
Case
Cooler Master RC-690
Cooling
Tuniq Tower 120, 2x 140mm and 3x 120mm case fans
Keyboard
Microsoft 500
Mouse
Razer Diamondback 3G
Internet Speed
14 Mb/s
Other Info
1x Koutech 3Gb/s SATA HDD Hot Swap Rack
google for sleep.exe, download it & stick it somewhere in your path, i use c:\windows. make a batch file for the desired action as above with sleep.exe <seconds> as the first line under the @echo off. 3600 secs=1 hr, 7200 secs=2 hrs, etc. one source is http://unattended.msfn.org/files/global/sleep.zip, they have a 64 bit version somewhere there as well. another source for the 32bit is microsoft's download centre, but you need to get the whole server resource kit utils pack, it's only 11mb tho.

ie.

@echo off
sleep.exe 7200
<command>
exit

would wait 7200 secs then run the <command>, 'exit' command optional :).

you could save the batch files in c:\windows, paste links to them on the desktop, you can change the default icon on the link in properties where you cannot easily change the icon on the batch files...

sleep.exe is a rather old dos command someone compiled to allow a timed delay in batch files & has nothing to do with putting the pc in the sleep state. name was coincidental.

there is another sleep.exe at http://www.gammadyne.com/cmdline.htm that IS a util that allows sleep or hybernate from the command line. obviously if you get both, rename one, ie. rename the delay one to delay.exe. OR rename the sleepy one to powerstate.exe or similar. or rename both ;)


You can also do a delay using ping.exe (not CPU intensive).

Example on delay of approx. 5 seconds (number behind -n is seconds +1): command line is:

ping.exe -n 6 localhost >nul

not sure how that would work on large n values.
 
Last edited:

My Computer My Computer

At a glance

Win 7 ultimate x64 sp1Intel i7 4 core 3770k ivy bridge o/c to 4.2ghz16 GBNvidia geforce GTX650
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom build Nanu by 3SX
OS
Win 7 ultimate x64 sp1
CPU
Intel i7 4 core 3770k ivy bridge o/c to 4.2ghz
Motherboard
Asus p8z77-i Deluxe
Memory
16 GB
Graphics Card(s)
Nvidia geforce GTX650
Sound Card
Realtek on mb
Monitor(s) Displays
24in. lcd/led
Screen Resolution
1920x1080
Hard Drives
128GB Kingston SSD
500GB seagate maximus xt hybrid
500GB hitachi HD
500GB external WD Passport usb3
PSU
Silverstone 450 watt
Case
Silverstone FT03 Black Fortress
Cooling
Water cooler
Keyboard
Logitech wireless kbd/mouse mk300
Mouse
Logitech wireless kbd/mouse mk300
Internet Speed
8mb adsl (actuall speed is around 6mb)
Other Info
Asus DSL-N55U wireless router
SONY BC-5850H 6X BLURAY writer
OUTPOST Security Suite
If you go into Power Options and disable hibernation, that command will cause the PC to go into Sleep mode instead.
You actually just turn off Hyrbid Sleep.

~Lordbob
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64, Mint 9Intel i5-2500k2x 4Gb Corsair VENGEANCE DDR3-1600NVidia GeForce N260GTX Twin Frozr
Computer Manufacturer/Model Number
Hera
OS
Windows 7 Ultimate x64, Mint 9
CPU
Intel i5-2500k
Motherboard
ASUS P8P67 Pro
Memory
2x 4Gb Corsair VENGEANCE DDR3-1600
Graphics Card(s)
NVidia GeForce N260GTX Twin Frozr
Sound Card
Realtek HD OnBoard Audio
Monitor(s) Displays
ASUS 24" Monitor
Screen Resolution
1920x1080
Hard Drives
G.SKILL Phoenix Series 60GB SATA II MLC Internal Solid State Drive (SSD)
SAMSUNG Spinpoint F3R 1TB 7200 RPM 32MB Cache SATA II
PSU
Cooler Master Real Power Pro 750W
Case
Cooler Master Haf 932
Cooling
Fans
Keyboard
Razer Tarantula
Mouse
Razer Lachesis
Internet Speed
not fast enough
Are you guys missing the power shell? When I was dabbling with Ubuntu, I had some aliases set up in my bashrc. file, when I was experimenting with the Terminal. I see Windows has stol, er, borrowed this. In Linux I had as an alias "zzz <x amount of minutes>" and it would run the bash command sudo shutdown -h <minutes> .

I haven't investigated the PowerShell yet but maybe someone knows?...:)
 
Last edited:

My Computer My Computer

At a glance

Windows 7 Home Premium x64 OEM --> RTM clean ...Intel T44004Gb? - Mobile Intel(R) 4 Series Express Chipset ...
Computer Manufacturer/Model Number
Toshiba Satellite L500
OS
Windows 7 Home Premium x64 OEM --> RTM clean install
CPU
Intel T4400
Motherboard
? - laptop inbuilt ?
Memory
4Gb
Graphics Card(s)
? - Mobile Intel(R) 4 Series Express Chipset Family ?
Sound Card
Realtek
Monitor(s) Displays
? + extended to a 42" LG55PC plasma tele!
Screen Resolution
1366 * 768
Hard Drives
320Gb 5500rpm
PSU
?
Case
?
Cooling
?
Internet Speed
3Meg, when it works.
Other Info
A LOWLY LAPTOP!

My Computer My Computer

At a glance

XP / Win7 x64 ProIntel Quad-Core Q9450 @ 3.2GHz2x2GB GSkill DDR2NVIDIA GeForce 8600 GTS (EVGA)
OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200

My Computer My Computer

At a glance

Windows 7 Ultimate x64, Mint 9Intel i5-2500k2x 4Gb Corsair VENGEANCE DDR3-1600NVidia GeForce N260GTX Twin Frozr
Computer Manufacturer/Model Number
Hera
OS
Windows 7 Ultimate x64, Mint 9
CPU
Intel i5-2500k
Motherboard
ASUS P8P67 Pro
Memory
2x 4Gb Corsair VENGEANCE DDR3-1600
Graphics Card(s)
NVidia GeForce N260GTX Twin Frozr
Sound Card
Realtek HD OnBoard Audio
Monitor(s) Displays
ASUS 24" Monitor
Screen Resolution
1920x1080
Hard Drives
G.SKILL Phoenix Series 60GB SATA II MLC Internal Solid State Drive (SSD)
SAMSUNG Spinpoint F3R 1TB 7200 RPM 32MB Cache SATA II
PSU
Cooler Master Real Power Pro 750W
Case
Cooler Master Haf 932
Cooling
Fans
Keyboard
Razer Tarantula
Mouse
Razer Lachesis
Internet Speed
not fast enough
You actually just turn off Hyrbid Sleep.

~Lordbob


What exactly are you referring to here? Who turns off Hybrid Sleep and how?
http://www.sevenforums.com/tutorials/22867-windows-does-not-start-after-sleep.html

~Lordbob

Unless I'm missing something here, I don't see how turning off Hybrid Sleep pertains to the question at hand or my response of disabling hibernation to enable the command to put the computer into sleep mode. Simply turning off Hybrid Sleep as you've posted will not put the computer into Sleep mode via the command previously posted. You still have to disable hibernation.

Am I missing something else?
 

My Computer My Computer

At a glance

XP / Win7 x64 ProIntel Quad-Core Q9450 @ 3.2GHz2x2GB GSkill DDR2NVIDIA GeForce 8600 GTS (EVGA)
OS
XP / Win7 x64 Pro
CPU
Intel Quad-Core Q9450 @ 3.2GHz
Motherboard
Asus P5-E
Memory
2x2GB GSkill DDR2
Graphics Card(s)
NVIDIA GeForce 8600 GTS (EVGA)
Monitor(s) Displays
Dell 2408WFP
Screen Resolution
1920x1200
Back
Top