command line shutdown of windows program

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I'm looking for a command line that will close an open
program i.e. Outlook. My backup procedure does not copy
the .pst file if outlook is running, in fact it removes
the copy that was on the backup media. Therefore I want
to put this command at the very beginning of my backup
batch file.
 
Bill,

XP has a command line utility called taskkill that might be what you're
looking for. You can kill remote computer processes, use different
credentials to do such, kill by process id, kill a whole process tree, it
supports wildcards and filtering, and on and on.

So, your command might look something like this:

taskkill /F /IM outlook.exe (F means forcibly, and IM specifies the process
(image) name, in this case outlook.exe

At the command line, run taskkill /? for full details and examples.

Good luck,

Patrick Pitre
 
Bill said:
I'm looking for a command line that will close an open
program i.e. Outlook. My backup procedure does not copy
the .pst file if outlook is running, in fact it removes
the copy that was on the backup media. Therefore I want
to put this command at the very beginning of my backup
batch file.

And if you have WinXP Home: Taskkill.exe is not available in WinXP Home, only
in Pro.

If that is the case, you could try to copy it from a Pro installation if you
can, or use the command line utility PsKill.exe in the free PsTools suite at
http://www.sysinternals.com/
 
Back
Top