Jump to content
Sign in to follow this  

Identify shutdown or reboot.

Recommended Posts


As it says, I need to be able to tell whether an OnAutoitExit() function was triggered by a user-request to shutdown, or to reboot.

@ExitCode distinguishes between logoff and shutdown (3/4) but not reboot. I wondered if there might be a registry value or suchlike that gives this info.

Reason: Have installed a script to backup users' .pst/.ost files (etc) when they log off or shutdown. This works quite nicely, and is more convenient than backing-up whilst the user is at the desk. Plus, it avoids the need for shadow copy as Outlook will always be closed. Only problem is that the script gets triggered on reboot as well, which is a nuisance if you're installing software that requires a reboot. Hence I want to identify reboots, and not do anything.

Edited by Anteaus

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this