Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine whether Windows is shutting down or restarting?

Status
Not open for further replies.

JZerfas

IS-IT--Management
Sep 30, 2004
4
US
I have a backup program that runs automatically as a shutdown script on Windows 2000 and XP computers. I'm trying to add some code that will cause the backup to be skipped if the computer is restarting instead of shutting down.

Is there anyway to determine whether Windows is performing a restart or shutting down? I don't care how it works as long as it works.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top