# Kill Process

**URL:** https://www.finalbuilder.com/forums/t/kill-process/543
**Category:** Discussion
**Created:** [July 30, 2007, 11:19am UTC](https://www.finalbuilder.com/forums/t/kill-process/543 "2007-07-30T11:19:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 30, 2007, 11:19am UTC](https://www.finalbuilder.com/forums/t/kill-process/543/1 "2007-07-30T11:19:14Z")

</div>

Hello,

When I've started a process like test.exe and I run a fb-action, which starts also a process test.exe, but from another directory, how can I kill only the test.exe process, created by the previous fb-action?

Kind regards,

Peter

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [July 31, 2007, 1:39am UTC](https://www.finalbuilder.com/forums/t/kill-process/543/2 "2007-07-31T01:39:15Z")

</div>

Hi Peter,   
  
 If you use the WMI Run Process action you can save the process id of the new “test.exe” process into a variable, then you can use the WMI Kill Process to terminate the process with that ID.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 31, 2007, 7:50am UTC](https://www.finalbuilder.com/forums/t/kill-process/543/3 "2007-07-31T07:50:55Z")

</div>

hy,

thanks for the answer, but this doesn't work...the following error occured, when I create the process with the wmi run process task:

Process creation failed - creation returned error code 9

I run this on a windows 2003 server, the help about the wmi run process task says:

WMI is supported on NT4 (you need to download it from Microsoft), Windows 2000 and XP.

Is that the problem? how can I handle this? Another Solution to save the process-ID?

&nbsp;

Kind regards,

Peter

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [August 1, 2007, 1:24am UTC](https://www.finalbuilder.com/forums/t/kill-process/543/4 "2007-08-01T01:24:23Z")

</div>

Hi Peter,   
  
 Sorry about the non-descriptive error message, an error code of 9 simply means that the specified path cannot be found. [[http://msdn2.microsoft.com/en-us/library/aa389388.aspx](http://msdn2.microsoft.com/en-us/library/aa389388.aspx)] The action will run fine on Windows 2003, I’ll update the help file to include this information for future reference.   
  
 Regards,   
 Paul.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 2, 2007, 7:50am UTC](https://www.finalbuilder.com/forums/t/kill-process/543/5 "2007-08-02T07:50:57Z")

</div>

Ok thanks, it works now!

Kind regards,

Peter
