Detect whether application-initiated shutdown is in progress? 
Author Message
 Detect whether application-initiated shutdown is in progress?

I'm writing a VBScript that asks a user to input a list of programs to run,
then runs each program sequentially using "wshshell.run
c:\path\to\exe\blah.exe, 1, True".  For well-behaved programs, this works
perfectly.  However, when an app runs that wants to reboot the PC, I'd like
to be able to have my script detect that Windows is shutting down so it
doesn't try to start the next program in the sequence.  For example, if a
custom Internet Explorer setup is run (that automatically reboots the PC
when it is finished installing), once it's finished I'd like to be able to
check to see if Windows is in the process of rebooting.  If so, I'll stop
the script.  Is there a registry key or environment variable set when a
program tells Windows to reboot, or am I missing something?  I know I could
just make some packages with AutoIT, but I'm avoiding that for various
reasons.

P.S.  I've cross-posted this to the wsh group as well as the vbs group,
since it's kinda relevent to both.  Please reply to the wsh group, though.
Sorry if I stepped on any toes with that.



Sun, 18 Jan 2004 02:25:05 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Detect whether application-initiated shutdown is in progress?

2. Detecting whether another application is running

3. Detecting Application Shutdown

4. Initiate system shutdown

5. Automatic Shutdown of Application when Windows is shutdown

6. Automatic shutdown of application when windows is shutdown

7. Automatic shutdown of application when windows is shutdown

8. Automatic shutdown of application when windows is shutdown

9. Automatic shutdown of application when windows is shutdown

10. Automatic shutdown of application when windows is shutdown

11. Lift System - No foreign application responded to a DDE initiate (Error 282)

12. Detecting whether Flash is installed

 

 
Powered by phpBB® Forum Software