script to terminate process in task manager
Posted: 14 Oct 2009 17:17
i need a script to terminate end process in task manager….
ex. end explorer.exe
ex. end explorer.exe
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
To make use of the script below, you need to know the name or ID of the process. Usually, the name of a process is its EXE's name. So, for Notepad, it's "notepad.exe" etcswan_x wrote:i need a script to terminate end process in task manager….
ex. end explorer.exe
Code: Select all
run 'cmd /c TASKKILL /F /IM "[INSERT PROCESS NAME OR ID HERE]"';Code: Select all
run 'cmd /c TASKKILL /F /IM "explorer.exe"';A duplicate post here:zer0 wrote:To make use of the script below, you need to know the name or ID of the process. Usually, the name of a process is its EXE's name. So, for Notepad, it's "notepad.exe" etcswan_x wrote:i need a script to terminate end process in task manager….
ex. end explorer.exe
If you wish to have a set script to kill a specific process then use this:so for explorer.exe it will beCode: Select all
run 'cmd /c TASKKILL /F /IM "[INSERT PROCESS NAME OR ID HERE]"';Code: Select all
run 'cmd /c TASKKILL /F /IM "explorer.exe"';
You can usually delete you own posts while they are first posted, but only Don/admin can delete a post/thread once it has been replied to...zer0 was just asking you to do so as a fellow user, and he may not have known that limitation...I ran into it myself just this week...you can edit a post after reply and delete contents but that still leaves the thread there.swan_x wrote:@ zer0
ok! work! tanxs! please delete for me my other post in "Script Exchange".....
I don't think you can put all 3 in 1 line of run command. You need 3 separate ones, which you can combine into a single script effectively achieving the same result.swan_x wrote:ok! i have 3 file to terminate...
a.exe
b.exe
c.exe
run 'cmd /c TASKKILL /F /IM "a.exe" TASKKILL /F /IM "b.exe" TASKKILL /F /IM "c.exe"';
but not work....
You should be able to combine them by separating them with "&&", but this has the side affect that if one fails all that follow are not performed.zer0 wrote:I don't think you can put all 3 in 1 line of run command. You need 3 separate ones, which you can combine into a single script effectively achieving the same result.swan_x wrote:ok! i have 3 file to terminate...
a.exe
b.exe
c.exe
run 'cmd /c TASKKILL /F /IM "a.exe" TASKKILL /F /IM "b.exe" TASKKILL /F /IM "c.exe"';
but not work....
Code: Select all
run 'cmd /c TASKKILL /F /IM "a.exe" && TASKKILL /F /IM "b.exe" && TASKKILL /F /IM "c.exe"';A simple Google search gives me this site which seems to explain it quite well: http://commandwindows.com/taskkill.htmswan_x wrote:the variable /F /IM what are??
Perhaps this variables generates the crash in explorer...