Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
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
1  
Have you checked the system event logs? –  CarlF Aug 31 '10 at 12:31
    
You could write an app that stops it: msdn.microsoft.com/en-us/library/aa376876(VS.85).aspx –  Default Aug 31 '10 at 13:35

1 Answer 1

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

 
discard

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.