D
D
Dmitry Amirov2018-05-11 01:31:00
cmd/bat
Dmitry Amirov, 2018-05-11 01:31:00

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

3 answer(s)
E
Ezhyg, 2018-05-11
@Ezhyg

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 ... :)

M
Maxim Yaroshevich, 2018-10-31
@YMax

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 question

Ask a Question

731 491 924 answers to any question