Ask the Expert

How to run a batch file at system shutdown

How do I run a batch file at system shutdown?

Requires Free Membership to View

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 first published in May 2007

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: