Situatie
Solutie
You can get Windows 11 to run your script when you turn off or on your PC.
To make the script run at the start of your PC, open Task Scheduler. Right-click your task and choose “Properties.” Open the “Triggers” tab and click “New.” Select the “Begin the Task” drop-down menu and choose “At Startup.” At the bottom, select “OK.” Choose “OK” to save your changes.
To make the run script run at the shutdown of your PC, you’ll use Local Group Policy Editor on your Windows 11 Pro edition. This utility isn’t available in the Home edition. To start, open Run by pressing Windows+R, type gpedit.msc, and press Enter. Navigate to Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) and double-click “Shutdown” on the right. Select “Add,” add your script file, and save the changes.
Leave A Comment?