Link to home
Start Free TrialLog in
Avatar of ttgt6840
ttgt6840

asked on

Create DOS batch file command to end program

I need to be able to add to my batch file a way to stop a program, similar to task manager when you end task on an application
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of whaupwit
whaupwit

  There is a command in the Win 2000 AdminPack called KILL.exe that is just what the doctor ordered.  The KILL.exe command was actually an NT file copyrighted by Microsoft in 1994.
   You can use options to force a process kill use, or you can even specify a process ID to be killed.  
   I have used this command with great success containing virus outbreaks.  Wrote a little batch to kill the offending process before deleting the source files and repairing the registry.
net start
net stop

you can use those commands in the batch file and just put in what you want to stop...

net start spoolsv.exe
This will start your print spooler
net stop spoolsv.exe
This will stop your print spooler

Hope that helps
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ttgt6840

ASKER

Thanks for the help and by the way the OS is XP PRO