I've got my system configured via gpedit so that it runs a custom batch script when it shuts down. The script can take about a minute to complete because it is telling some external hardware to run through its power down procedure. However when I tell the system to _reboot_ the script still runs and then when the system starts back up it has to run the startup script to power the hardware back up again.
Therefore I wondered if there is a way to tell Windows not to run the script if the action is reboot, not shutdown, or can I get access to the action via some parameters that can be passed to my script?
Searched through forums but can't find any answer to this - maybe the search terms are too common.