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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the help and by the way the OS is XP PRO
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.