Run command at Shutdown

  • Thread starter Thread starter Chris Forzetting
  • Start date Start date
C

Chris Forzetting

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

Thanks,

Chris Forzetting
 
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
 
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.
 
Back
Top