um im not sure of the practicality of this solution, but could you not have your app running in the background and use the queryunload event to catch the system shutdown?!?
you may need the abortsystemshutdown api to stop windows actually shutting down, im not sure!?
then when your code has executed use the initiatesystemshutdown api.
just an option, but i imagine there will be a much simpler solution somewhere!!
good luck If somethings hard to do, its not worth doing - Homer Simpson
I just need to update a file with a few tidbits of info when a shutdown is triggered. The program executes in a split second so it wouldn't be much of an interruption to shutdown, if any. So yes, I want the program to be initiated when a user shuts down the computer.
Why do I want to do this? Because the users asked me to.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.