Running Script on Shutdown using Windows 8

Is there any way to execute a Batch- or PowerShell-Script on shutdown using Windows 8 without disabling FastBoot?

I know you can add a script using "gpedit.msc", but I found that Windows 8 won't execute the shutdown script as long as FastBoot is enabled.

Having to deploy the script in an enterprise I don't wanna add shutdown command at the end of the script and tell some dozens people to shutdown the PC via the script.


Solution 1:

Create a wmi event watcher on Win32_ComputerShutdownEvent, run it silently in the background from your logon script. It will wait all-day for the shutdown command. Upon event, send the "shutdown -a" and call your script.