There are ways to do it with the group policy editor, but for those that prefer to use the task scheduler here’s how:
- Go to Task Scheduler.
- Click on Create Task.
- Name it, give it a description.
- Check “Run with highest privileges”.
- Check “Run whether user is logged on or now.
- Go to “Triggers” tab.
- Add a new Trigger.
- Log: System
- Source: User32
- Event ID: 1074
- Go to “Actions” tab and add whatever you want. Make sure it doesn’t take too long to execute.