MSDOS command for hibernation
flolag
Posted messages
31
Status
Member
-
taps -
taps -
Hello,
I would like to create a script to put a PC into hibernation.
I have the command shutdown -h that allows the PC to enter hibernation, but I would like to pass a parameter so that the machine wakes up from hibernation at a specified time.
Thank you
I would like to create a script to put a PC into hibernation.
I have the command shutdown -h that allows the PC to enter hibernation, but I would like to pass a parameter so that the machine wakes up from hibernation at a specified time.
Thank you
3 answers
Hello.
First, to activate hibernation, the command is
powercfg -h on
And to disable it
powercfg -h off
Then you can simply create two Batch files
(files with the .BAT extension) containing this:
Hibernation_on.bat
............................................................................
cmd.exe /k
cls
@echo off
powercfg -h on
pause
exit
.............................................................................
Hibernation_off.bat
.............................................................................
cmd.exe /k
cls
@echo off
powercfg -h off
pause
exit
............................................................................
Then you just need to insert these two files into the Task Scheduler.
(Of course, do not include the dashes, it's just to separate).
You can also use the AT command
In the command prompt, type
at /?
to see all its options.
First, to activate hibernation, the command is
powercfg -h on
And to disable it
powercfg -h off
Then you can simply create two Batch files
(files with the .BAT extension) containing this:
Hibernation_on.bat
............................................................................
cmd.exe /k
cls
@echo off
powercfg -h on
pause
exit
.............................................................................
Hibernation_off.bat
.............................................................................
cmd.exe /k
cls
@echo off
powercfg -h off
pause
exit
............................................................................
Then you just need to insert these two files into the Task Scheduler.
(Of course, do not include the dashes, it's just to separate).
You can also use the AT command
In the command prompt, type
at /?
to see all its options.