Answer the question
In order to leave comments, you need to log in
How to execute bat script before windows hibernation?
Under Windows, before going into hibernation, it became necessary to put out several programs, disconnect a network drive, and a couple of other things. For all this, a bat script has been written that can do all this.
Attention question. How to make Windows run this script before going into hibernation, wait for its execution to complete, and only then go into hibernation as expected? Again, it is very important to run the script BEFORE going into hibernation and wait for its execution to complete.
Before hibernation, session exit, etc. there is no need to execute the script. It is only necessary before going into hibernation.
Answer the question
In order to leave comments, you need to log in
Start > Run > gpedit.msc > Computer (or user) configuration > Windows configuration > Scenarios,
although I'm not completely sure, but there is definitely a shutdown, and hibernation is also a way to shut down ... :)
As a solution, turn on "Always on" in the computer's power settings, perhaps just turn off the screen, and specify shutdown / h / t 60 as the last line in the script, run the script from the task scheduler, when idle, idle conditions can be specified in the scheduler - as No other thoughts come to mind.
Clue
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question