Manage Learn to apply best practices and optimize your operations.

How to run a batch file at system shutdown

Learn two ways admins can run a batch file at system shutdown in this desktop management Ask the Expert Q&A.

How do I run a batch file at system shutdown?
There are a couple of ways to do this. You can edit Group Policy, under Computer Configuration | Windows Settings | Scripts (Startup/Shutdown); there you can add entries for any number of things to run at shutdown. Or, you could create a batch file which runs whatever you want and then shuts the computer down by using the SHUTDOWN command. Depending on your needs, you can use either approach.
This was last published in May 2007

Dig Deeper on Windows Server and Network Security

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.