kill running process

משי מור

New member
kill running process

hi all can anyone know how can I write in batch file a code which allow me to kill running application ?? I know that there are some external programs, but I need the code only, using win2000 and the code should be feet to commnd codes :) thanks
 

selalerer

New member
Kill a process.

Usualy under WIN2K you should use a vbs file to kill a process. The content can be as following : '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' comPname = "myCompName" processname = "calc.exe" set wmi = getobject("winmgmts://" & servername & "/root/cimv2") wql = "select * from win32_process "_ & " where name='" & processname & "'" set results = wmi.execquery(wql,,48) for each process in results wscript.echo "killing process " & process.name process.terminate next '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' This vbs file, when you'll double click it, will kill any calculator windows open. You can know your computer name by looking at "my computer" properties in the "Network identification" tag. If you need to run it from a bath file, you can by writing: CScript terminate_process.vbs "terminate_process.vbs" is the file with the content above. Have fun.​
 
למעלה