1
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?
1Thanks for the tip. I successfully got it working as "System" with event id 1074 by USER32 (System log). I'm running
shutdown /a
at the begining andshutdown /r /t 00
at the end. – week – 2015-10-06T19:40:21.730Your saying that once the task is running the script calls shutdown /a then runs what it needs to then when done calls shutdown /r /t 00? Interesting. I'll have to try that. – Benjamin Jones – 2015-10-06T19:45:44.157
Yes, without that, I would worry that Windows interrupts my script. Also as you wrote, you have "Winlogon" as a source, but in my logs I see those events from "USER32". – week – 2015-10-06T19:53:33.040