Running script on shutdown

Associate
Joined
19 Jun 2003
Posts
1,680
Location
West Yorks, UK
Hi all,
I'd like to put together a batch file that runs chkdsk, AVG update and Windows Update (is possible!). I want the batch file to be called when the user shuts down the PC. This will be used in a corporate environment, so it needs to be done either using the features of XP/2000, or Server 2000/2003 - I can't afford to be installing extra software on each PC to make it work.

Having browsed the web, I can't find much that doesn't use additional apps. Does anyone know how to do it? If so, can you share your knowledge with me? :D

Matt
 
Are you using active directory?

If so open up your policy, go to user config/windows settings/scripts (logon/logoff) and create a log off script for what you want.

Obviously this isnt for shutting down, but un that case you could just create a batch file calle shutdown, that does each of the tasks then shuts the machine down when it's done.
 
feenster99 said:
Hi all,
I'd like to put together a batch file that runs chkdsk, AVG update and Windows Update (is possible!). I want the batch file to be called when the user shuts down the PC. This will be used in a corporate environment, so it needs to be done either using the features of XP/2000, or Server 2000/2003 - I can't afford to be installing extra software on each PC to make it work.

Having browsed the web, I can't find much that doesn't use additional apps. Does anyone know how to do it? If so, can you share your knowledge with me? :D

Matt

They are other better methods to windows updates in a corporate environment. Its called WSUS if you haven't heard of it.

Look in to it as it will do WU for you and report back if PC are missing certain updates.

We use it a lot at our clients, neer had an issues with it.
 
Yeah, i've actually just installed WSUS on our internal server. Slows it down dramatically, but I can see it's potential.

For the time being though, I think a shortcut on the desktop linking to a shutdown batch script will be the best bet. The question is though, how can I execute Windows/AVG updates from the command line? :confused:

Matt
 
Back
Top Bottom