I have a script and I've created as Task in Task Scheduler to run the script that will uninstall a program. The trigger I am using is, On Event> System>WinLogon>Event ID 1074 (I've used ID 7002 as well). This doesn't work to run the script during reboot.
The issue I am having is the script(that works fine) is not executing right before the computer physically reboot.
My question:
If a reboot command is executed how can I run a script that will uninstall a program THEN finish the reboot. Or is this not possible and I should go another way?
The goal of this is to execute the script when the user is not interacting with the computer and logon is not an option(for other reasons). Execution of script during logon could be a option but only if there are no other options.
Any help?
shutdown /a
at the begining andshutdown /r /t 00
at the end.