I want to run a *.bat file every time system returns/"wakes up" from hibernation (NOT a sleep mode). How can I do that?
System: Win XP SP3.
I would very strongly prefer to solve it without using 3rd party utilities.
Set up a scheduled task in task scheduler and use an event as trigger(choose "When a specific event is logged"). In that, select following options:
And then schedule whichever batch you wish to run. This should achieve your purpose. (I have tested this with Win 7 bcoz I don't have Win XP running. Should work with XP as well.)
I don't know if it's ok to answer after such a long time but the solution is to hibernate using a command inside the bat file followed by the commands you originally wanted to run. So when you Windows wakes up, it continues with the commands placed after the hibernate command. Here are some examples from Microsoft Community:
And my personal example for Win7 is:
It unmounts the E drive before hibernate and remounts it when Windows wakes up (necessary for my dual boot).