Sign in to follow this  
Followers 0
blitzkrg

Graceful shutdown flag?

3 posts in this topic

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?

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0