Determine if Windows is shutting down
-
Hi there, Is there a way to determine if windows are shutting down in a VB application? Thanks, Werries
A programmer's life is good... or is it?? Ek dink nie so nie!
i believe windows executes a batch file to initialise shutdown sequence, perhaps you could use the filewatcher to monitor this file for changes, then if something happens with it, check if the shutdown process in is started through system.diagnostics.process.
Posted by The ANZAC : "WWBD, What Would Buffy Do?" : "I don't know man, she's stronger than me"
-
Hi there, Is there a way to determine if windows are shutting down in a VB application? Thanks, Werries
A programmer's life is good... or is it?? Ek dink nie so nie!
Have a look at SystemEvents class. :)
Luc Pattyn [My Articles] [Forum Guidelines]
-
Hi there, Is there a way to determine if windows are shutting down in a VB application? Thanks, Werries
A programmer's life is good... or is it?? Ek dink nie so nie!
hi you can use ghedit.msc and scrip to determine when windows are shutting down. goto : Run -> gpedit.msc -> computer configuration -> windows setting -> scripts ->shutdown. and then add your vb script that you want to run at shutdown.