Use Group Policy Editor To Run Scripts When Shutting Down Your PC

Use Group Policy Editor To Run Scripts When Shutting Down Your PC

Windows: To automate some routine tasks that nobody likes doing during the day, you can use Group Policy Editor to make your PC run a script when you shut it down or log off a user account.

To set up a script to run as soon as you shut down your PC, follow these instructions:

  1. Open GPE by entering “gpedit.msc” (no quotes) into the Run dialog (Win+R).
  2. In the left panel, select “Windows Settings” under “Computer Configuration”.
  3. Double-click “Scripts (Startup/Shutdown)” in the right panel.
  4. Double-click “Shutdown”
  5. Click “Add…”
  6. Navigate to the folder containing the script you want to run.
  7. Click “OK”.

You can also use this method to run scripts when logging out of a user profile. This is handy for performing regular maintenance tasks, cleaning up your workspace or simply running apps that you don’t want running while you’re using your machine. Unfortunately, the Group Policy Editor is only available on Professional or Ultimate versions of Windows.

Nifty Way to Automatically Run a Windows Script or Program Whenever You Turn Off the PC [Gizmo’s Freeware]


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


2 responses to “Use Group Policy Editor To Run Scripts When Shutting Down Your PC”