HowTo run program on Shutdown

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to run a *.bat script on every shutdown. It's some basic clean
up of selected directories.
How Do I do that - where do I place it?

:-) Martin

PS. Yes it is my pc and I do have administrator acces.
 
Martin said:
I would like to run a *.bat script on every shutdown. It's some basic clean
up of selected directories.
How Do I do that - where do I place it?

:-) Martin

PS. Yes it is my pc and I do have administrator acces.

If you have WinXP Professional then you can use the
policy editor (gpedit.msc) to do this.

If you have WinXP Home then you have to use your own
shortcut to shut down the machine. The batch file it invokes
has two lines: The first to clean up your directories, the
second to invoke shutdown.exe.
 
It is a pity that WinXP doesn't have a Shutdown folder as it has a
Startup folder, but I knew of some shareware utilities that added it.
Maybe, if you search on Google you could find them.

Martin said:
I would like to run a *.bat script on every shutdown. It's some basic clean
up of selected directories.
How Do I do that - where do I place it?

:-) Martin

PS. Yes it is my pc and I do have administrator acces.
Thanks
Juan I. Cahis
Santiago de Chile (South America)
Note: Please forgive me for my bad English, I am trying to improve it!
 
It is a pity that WinXP doesn't have a Shutdown folder

If XP Pro it does

%windir%\system32\GroupPolicy\Machine\Scripts\Shutdown

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Back
Top