Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an event that is triggered when a Windows 7 computer has been restarted after being put into hibernate which I can use to run a program - very much the same way the task scheduler would to, just not time based in this case, but event based?

It'd be easy to accomplish after system start, but I haven't found anything similar for a "return from rest mode" scenario.

I need to start an exe in order to send an email notification every time this happens.

share|improve this question
By "rest mode" do you mean suspend and/or hibernate? – John Gardeniers Oct 10 '11 at 9:39
@John Gardeniers: Hibernate. I'll correct that (my translation from German was too direct, apparently). However, knowing this for sleep mode would be interesting as well. – Olaf Oct 10 '11 at 9:53
up vote 2 down vote accepted

I've just test a little program I wrote years ago and it does work on Windows 7. When run it places an icon in the system tray. Right click the icon and select Configure. The rest should be obvious. Download it from here. (It's freeware and therefore comes with no warranties of any sort.)

share|improve this answer
Thanks very much. I will test it asap. Can you point in the direction of the principle that has been used? – Olaf Oct 11 '11 at 6:18
@Olaf, Windows sends what amounts to internal broadcast messages when certain events occur, such as when entering or exiting suspend or hibernate modes. My program simply waits for those message and then runs whatever you have configured for that event. – John Gardeniers Oct 11 '11 at 9:10
It works! Great stuff, thanks a lot. – Olaf Oct 11 '11 at 9:48

If you're on Windows XP this claims to do do what you need:

share|improve this answer
The question very clearly states that it's a Windows 7 machine. – John Gardeniers Oct 10 '11 at 20:36
You're right - totally missed that! – Dan Oct 11 '11 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.