Run command at Shutdown

C

Chris Forzetting

Is there any native way to automatically run a command such as a batch file
at shutdown?

Thanks,

Chris Forzetting
 
W

Wesley Vogel

If XP Pro, use Group Policy.

Local Computer Policy\Computer Configuration\Windows Settings\Scripts
(Startup/Shutdown)

Local Computer Policy\User Configuration\Windows Settings\Scripts
(Logon/Logoff)

%windir%\system32\GroupPolicy\Machine\Scripts\Shutdown
C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Shutdown

%windir%\system32\GroupPolicy\Machine\Scripts\Startup
C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Startup

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
W

WTC

Chris Forzetting said:
Is there any native way to automatically run a command such as a batch
file
at shutdown?

If you using XP home, you could create a batch file with a shortcut pointed
to it. Within the batch file, enter your commands, then at the end of the
file you could enter:

shutdown -s -t xx

where xx is the number of second in which the shutdown procedure will
commence. Type "shutdown /?" for more info at the command prompt.

So you use your Shortcut that is pointed to your batch file to start your
Shutdown procedure.

But if your using XP Pro, Wesley's suggestion is your best option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top