Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch File To Kill A Process
Name: jkissl Date: March 31, 2009 at 10:07:11 Pacific OS: Windows XP Subcategory: Batch
Comment:
On one of the computers that i use, there is a piticular process that starts up every few min. I was wondering how to write a batch file that Kills the process as it starts. i have created a looping batch file, but i was wondering if it could be stream lined. @ECHO off Title Pk
:top Title Killing ********.exe TASKKILL /F /T /IM ********.exe Title Killing ********.exe TASKKILL /F /T /IM ********.exe Title Killing *******.exe TASKKILL /F /T /IM *******.exe Title Killing **********.exe TASKKILL /F /T /IM **********.exe goto :top
this is what i have, any way to make it kill the process only as they apper?
Name: reno Date: April 2, 2009 at 01:35:18 Pacific
Reply:
quote: kill the process only as they apper
q="select * from __InstanceCreationEvent within 1 where " & _ "targetinstance isa 'win32_process' and "& _ "targetinstance.name='" & wsh.arguments(0) & "'" set a=getobject("winmgmts:").execnotificationquery(q)
Name: jkissl Date: April 2, 2009 at 12:08:51 Pacific
Reply:
Thanks for the reply, however it did not work, could you please show me the usage? or clarafy the code?
0
Response Number 3
Name: Razor2.3 Date: April 2, 2009 at 18:09:33 Pacific
Reply:
This seems like a bad idea. Why not simply deal with the offending .EXE, instead of trying to kill it?
0
Response Number 4
Name: jkissl Date: April 3, 2009 at 05:53:57 Pacific
Reply:
I have tried several other ways, however the most effective way is a batcfile, they are portable, dont require an install, and universal to most windows computers. The processes that i wish to end/kill are on several computers so portability is key.
0
Response Number 5
Name: formeofme Date: April 20, 2009 at 08:54:32 Pacific
Reply:
I would like to kill a java process it self
for using TASKKILL i need to get the current processId
can any on ehelp me on how to get that from java running code.
As i am planning to call a batch file from jav to kill itself
Summary: I am trying to create a batch file to kill a process only if it is running. I found a pskill tool from windows xp tool site but when I put it in the batch file and scheduled the task, a black window ...
Summary: I need to place a shortcut on everyone's PC in the office to a program we're running on the server ... so I need them all to get a shorcut to the executable. I want to create a batch file that creates...
Summary: Hi.. I am creating a batch file to replace a word in all the text files in a directory. File Example:- FILE 1:- "ISA*00* *00* *ZZ*ABCDEFGHI *ZZ*ABCDEFG " FILE 2:- "ISA*...