script to terminate process in task manager
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
script to terminate process in task manager
i need a script to terminate end process in task manager….
ex. end explorer.exe
ex. end explorer.exe
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: script to terminate process in task manager
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:
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"';Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
serendipity
- Posts: 3360
- Joined: 07 May 2007 18:14
- Location: NJ/NY
Re: script to terminate process in task manager
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"';
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=4181
@swan_x: can you please delete one of the posts?
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to terminate process in task manager
@ zer0
ok! work! tanxs! please delete for me my other post in "Script Exchange".....
ok! work! tanxs! please delete for me my other post in "Script Exchange".....
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
Re: script to terminate process in task manager
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".....
A second thread was never needed as once it has been replied to, even if in the wrong forum, it generally has to remain in the original location...and so when you created the duplicate, and serendipity answered that one, it got "locked in" there, as did this first one.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to terminate process in task manager
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....
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....
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: script to terminate process in task manager
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....
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: script to terminate process in task manager
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"';-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to terminate process in task manager
@ TheQwerty
yes! yes! yes! yes! yes! yes! yes! yes! yes!
tanxsssssssss
yes! yes! yes! yes! yes! yes! yes! yes! yes!
tanxsssssssss
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to terminate process in task manager
one clarification...
after launch my script
run 'cmd /c TASKKILL /F /IM "a.exe" && TASKKILL /F /IM "b.exe" && TASKKILL /F /IM "c.exe"';
explorer.exe crash...!! and after the message "Send Error to microsoft".....why???
after launch my script
run 'cmd /c TASKKILL /F /IM "a.exe" && TASKKILL /F /IM "b.exe" && TASKKILL /F /IM "c.exe"';
explorer.exe crash...!! and after the message "Send Error to microsoft".....why???
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: script to terminate process in task manager
This would all be a lot easier if you just posted your script and explained what the heck you were trying to do.
Frankly, all these small snippets give me the feeling that you're using the wrong tool for the job and would be better off asking someone to write a script in an appropriate language for what you want.
Frankly, all these small snippets give me the feeling that you're using the wrong tool for the job and would be better off asking someone to write a script in an appropriate language for what you want.
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to terminate process in task manager
no, no! your script work!
is not the case for something so silly!
thanks again!
is not the case for something so silly!
thanks again!
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to terminate process in task manager
the variable /F /IM what are??
Perhaps this variables generates the crash in explorer...
Perhaps this variables generates the crash in explorer...
-
j_c_hallgren
- XY Blog Master
- Posts: 5826
- Joined: 02 Jan 2006 19:34
- Location: So. Chatham MA/Clearwater FL
- Contact:
Re: script to terminate process in task manager
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...
It seems that English is not your native language which may be part of the problem here.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.
XYplorer Beta Club