Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Run a task on System Shutdown

$
0
0

Hello

I have a script that runs once a month and it ask the user to install new updates on their system. The user has an option to choose NO and when that happen, I would like to run the script again when the user shutdown their computer.

Task Scheduler doesn't have option to run a task on System Shutdown. And, I do not want to shutdown the system myself, I would like to wait until the user try to shutdown the system and at that moment I want to run a script.

I know you can set a Shutdown Scripts in the Local Group Policy Editor. But, how can I create this task automatically via a script or a command?


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>