I need a way to be able to detect as soon as possible if windows is restarting. Unfortunately, I can not use the QueryUnload because it is not fired early enough for my program. Here is what my program is supposed to do, first it runs another program, which may, or may not reboot windows. If it does reboot windows then my program waits for the restart, autoruns, and continues. If it does not reboot, then my program just continues. Currently my program starts the other program and waits for it to end. After it ends, I start a timer waiting about 15 seconds before proceeding, and if in those 15 seconds, there is a QueryUnload event, then the timer is canceled. It works, but if there is no reboot then the timer is just making the user wait for no reason, not to mention the fact that on some slower systems, the event takes even longer to occur. What I am hoping for is to be able to proactively check for restart, instead of waiting for the event. By the way I am using VB6, eeek !
Any ideas ?
Thanks in advance