Super User is a question and answer site for computer enthusiasts and power users. 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

I have a problem, every few days my company restarts my workstation, and I keep losing work because of this. I opened a support ticket with the support team, but they have no idea how to stop it from happening (typical).

I know that they're not using the shutdown command to restart my PC, because running shutdown -a doesn't stop it from happening.

I was thinking maybe someone has made a "keep alive" app to stop anything from restarting my workstation, so that I can restart it myself when I'm ready to do so (i.e. after I've saved my work, etc). Because of the work I do (I'm a programmer) it's not always possible to save what I'm doing (e.g. if I'm in the middle of debugging something complicated).

Maybe I can intercept and block some sort of shutdown message in the winapi (though this discussion would me more suited to Stack Overflow).

share|improve this question
Does it happen regularly? Is it Windows updates? – Mike Fitzpatrick Aug 31 '10 at 9:06
This is not caused by Windows updates. I'm not sure what application is causing my PC to restart - it could be the anti-virus. I was hoping there was something that could just block Windows from restarting. I believe that fixing the "root cause" is out of my hands. – nbolton Aug 31 '10 at 11:52
If you unplug the network cable, does it still do it? It could be a remote administration system... Just trying to rule out things you can't control. – Wolf Aug 31 '10 at 12:24
Have you checked the system event logs? – CarlF Aug 31 '10 at 12:31
You could write an app that stops it: – Default Aug 31 '10 at 13:35
up vote 1 down vote accepted

You could write the application yourself, and catch the WM_QUERYENDSESSION message.
This program apparently stops a system from going to Sleep, but I don't think that would suffice.

share|improve this answer
I will try it at least. – nbolton Sep 2 '10 at 13:04
@nbolton: sweet :) I think that the author of the Insomniac program made the source available, so you could study that as well. – Default Sep 2 '10 at 20:38

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.