Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically run a script on shutdown? 1

Status
Not open for further replies.

cpjust

Programmer
Joined
Sep 23, 2003
Messages
2,132
Location
US
Hi,
I'm wondering if there is an opposite of the Windows Startup Folder? I'd like to ensure that all my Virtual Machines are cleanly shut down before the host OS shuts down or reboots. Is there a way to do that?
 
I don't know if there is a folder, but you can configure a shutdown script via GPO. You can configure it on a GPO under Computer Configuration --> Windows Settings.
 
I'm not sure what you mean by "Computer Configuration -> Windows Settings". Is that in the Control Panel, Start Menu...?
From what I read on Microsoft's site, you have to download and install something extra to have GPO on your system:
I tried running GPMC.msc, but it didn't find it, so I'm guessing it's not already on my Win2003 R2 system?
 
If this is going to be on one system, or multiple systems not in a domain, I would suggest just placing it within the local group policy (gpedit.msc). Once there, as FloDiggs suggests, look at Computer Configuration --> Windows Settings --> Scripts. There is a "shutdown" feature on there. Edit the setting and add the script/bat.

If it will be on multiple systems, with each system in a domain, it would be in your best interest to get GPMC. The link you provided is for the GPMC with Service pack 1. You do not need it to make policies, however, it does make creating and editing Group Policies in a domain a lot easier.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top