Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Detecting Windows Restart

Avatar of exptech
exptechFlag for United States of America asked on
Visual Basic Classic
8 Comments1 Solution369 ViewsLast Modified:
Hey Guys/Gals

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
ASKER CERTIFIED SOLUTION
Avatar of nffvrxqgrcfqvvc
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers