Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, March 13, 2017 8:16 PM
We have a script we would like to run at Shutdown (or logoff if need be) and we need the event id(s) necessary to do this. The script does take a while to run, but we would like to dictate how long the script runs, and be able to spontaneously run it as well, which is why we want to use Task Scheduler.
I am already aware of the Shutdown scripts option in the LGPO via gpedit, and we do not want to use that.
Thanks
All replies (5)
Wednesday, July 12, 2017 1:43 PM ✅Answered
Sorry for the long delay. I ended up just doing a logon/logoff script, and putting a timer in the script itself.
Monday, March 13, 2017 9:22 PM
Here's how I do a logoff script:
Log: System
Source: Winlogon
Event ID: 7002
Although if you're trying to display a dialog box, that doesn't seem to work in Windows 10.
Tuesday, March 14, 2017 6:17 AM
Hi ,
The below is a similar case for your reference. To do this, we should also add event IDs below for logoff or shutdown event:
•6005
•6006
•1074
•4634
•4647
Please also create these tasks based on above event ID under Security.
Question about Task Scheduler during logoff event
https://social.technet.microsoft.com/Forums/windows/en-US/a477239c-ce2f-4faf-90bd-0a30ea68b41a/question-about-task-scheduler-during-logoff-event?forum=w8itprogeneral
Best regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Wednesday, March 22, 2017 9:46 AM
Hi ,
We haven’t heard from you in a couple of days, have you solved the problem? We are looking forward to your good news.
Best regards
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Thursday, July 13, 2017 1:26 AM
Great!
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].