.BAT file to kill all running programs and log off?

Soldato
Joined
20 Jan 2005
Posts
2,722
Location
Whitley Bay
Trying to write a .BAT file to kill off all my programs at the end of the day and log off.
I've got one to launch all of my programs and I want one to basically do the opposite.
I'm aware of the KILLTASK command but unfortunately I'm on Win2k which puts a stop to that.
Not allowed to install any additional software so really need to use the existing utils within Windows.

Any ideas?

TIA

Si.
 
Ended up with pskill.exe from sysinternals and logoff.exe from the win2k resource kit.
Shutdown isn't recognised as a command - may have been disabled by IS :/
 
Getting a bit of an issue with the .BAT where it seems to be looping.
It'll end all of the programs but then try and run the commands again.
Because the process no longer exists it asks if I want to abort the operation and just keeps looping for each process.

The .bat file is basically:

pskill SalesGUI.exe
pskill outlook.exe
pskill iexplore.exe
pskill Virtual PC.exe

logoff /n /f

Any ideas?
 
Back
Top Bottom