blitzkrg Posted April 16, 2009 Share Posted April 16, 2009 Does anyone know if there is a graceful shutdown flag in windows? So lets say my server crashes, when it starts back up, i may not want certain programs to run. So i was thinking, when shutting down gracefully, is a flag/bit set? I could check for that, and if it doesnt exist, assume crash/power failure and then prevent certain programs from running? Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 16, 2009 Share Posted April 16, 2009 Does anyone know if there is a graceful shutdown flag in windows?So lets say my server crashes, when it starts back up, i may not want certain programs to run.So i was thinking, when shutting down gracefully, is a flag/bit set? I could check for that, and if it doesnt exist, assume crash/power failure and then prevent certain programs from running?There is a "dirty bit" somewhere. When restarting the EventLog service, a fail event is added to the system log. Something along the lines of "Windows previous shutdown was unexpected...", or some such. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
blitzkrg Posted April 16, 2009 Author Share Posted April 16, 2009 There is a "dirty bit" somewhere. When restarting the EventLog service, a fail event is added to the system log. Something along the lines of "Windows previous shutdown was unexpected...", or some such. I will search on that - thanks for the info! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now