# WMI Process Info

**URL:** https://www.finalbuilder.com/forums/t/wmi-process-info/3593
**Category:** Bugs
**Created:** [September 18, 2015, 10:02am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593 "2015-09-18T10:02:59Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![michael.jelich](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@michael.jelich](https://www.finalbuilder.com/forums/u/michael.jelich)
#### Post date: [September 18, 2015, 10:02am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593/1 "2015-09-18T10:02:59Z")

</div>

Hi Support Team,  
  
I’d like to close a process by means of the Close Process action. The help says that I can grab the required ProcessID from WMI Process Info.  
  
The help for WMI Process Info says that I need to grab the info in the After Action script event. But the only ProcessID provided by the Action is Action.ProcessParentProcessId. Action.ProcessID is a string, which contains the ProcessID entered on the Action Property Editor - which is empty because I search by name.  
  
The debug output is as follows:  
  
WMI Process Info  
&nbsp;&nbsp;&nbsp; Status: Completed  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Date: 18.09.2015  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Time: 09:52:28:070  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End: 09:52:28:183  
&nbsp; Duration: 00:00:00:113  
  
Action Messages:  
Process found  
Process name: miae.exe  
Caption: miae.exe  
Description: miae.exe  
HandleCount: 278  
ExecutablePath: C:\Program Files (x86)\InstallAware X3\miae.exe  
ThreadCount: 5  
Priority: 8  
WorkingSetSize: 69431296  
PeakWorkingSetSize: 68684  
PageFaults: 25876  
PageFileUsage: 39296  
ParentProcessId: 2824  
PeakPageFileUsage: 43240  
PeakVirtualSize: 224886784  
CreationDate: 18.09.2015 09:44:01  
KernelModeTime: 37500000  
MaxWorkingSetSize: 1380  
MinWorkingSetSize: 200  
OtherOperationCount: 1825  
OtherTransferCount: 53298  
PrivatePageCount: 40239104  
QuotaNonPagePoolUsage: 69  
QuotaPagePoolUsage: 384  
QuotaPeakNonPagePoolUsage: 87  
QuotaPeakPagePoolUsage: 407  
ReadOperationCount: 5475  
ReadTransferCount: 72995793  
SessionId: 2  
UserModeTime: 27656250  
WriteOperationCount: 109  
WriteTransferCount: 935939  
  
The current ProcessID should be stated as 1260.  
  
Do I miss something?  
  
Best regards  
Michael

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [September 21, 2015, 2:57am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593/2 "2015-09-21T02:57:07Z")

</div>

Hi Michael,   
  
 Thanks for reporting this. Turns out the process id was not being set if the process was being found by name. I have corrected the issue in both FinalBuilder 7 and 8. You can find the releases below. Please let me know if these fixes suit your needs and I will merge these updates into the main code base.   
  
 You will still need to set your variable in the after script of the WMI process info action. It will now however have a value which is set to the actual process id of the process found.   
  
  
 [http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700\_3451.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_3451.exe)   
  
 [http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_1141.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_1141.exe)

---

<div class="post-metadata">

### Author: ![michael.jelich](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@michael.jelich](https://www.finalbuilder.com/forums/u/michael.jelich)
#### Post date: [September 23, 2015, 2:12am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593/3 "2015-09-23T02:12:02Z")

</div>

Hi Jason,  
  
I tried the new FB 7 installer. The output from WMI still does not contain the ProcessID:  
  
Process found  
Process name: Uedit32.exe  
Caption: Uedit32.exe  
Description: Uedit32.exe  
HandleCount: 329  
ExecutablePath: C:\Program Files (x86)\UltraEdit\Uedit32.exe  
ThreadCount: 14  
Priority: 8  
WorkingSetSize: 35229696  
PeakWorkingSetSize: 34440  
PageFaults: 9675  
PageFileUsage: 13360  
ParentProcessId: 4256  
PeakPageFileUsage: 13400  
PeakVirtualSize: 263393280  
CreationDate: 23.09.2015 14:05:53  
KernelModeTime: 3120020  
MaxWorkingSetSize: 1380  
MinWorkingSetSize: 200  
OtherOperationCount: 3342  
OtherTransferCount: 16532  
PrivatePageCount: 13680640  
QuotaNonPagePoolUsage: 30  
QuotaPagePoolUsage: 380  
QuotaPeakNonPagePoolUsage: 30  
QuotaPeakPagePoolUsage: 421  
ReadOperationCount: 170  
ReadTransferCount: 1299230  
SessionId: 1  
UserModeTime: 1560010  
WriteOperationCount: 3198  
WriteTransferCount: 103387  
  
But your’re right, the ProcessID from the property editor is set to the ProcessID. I can use it, but a side effect is, that the finalbuilder project is modified. If saved the ProcessID is in the fbp7 file. As this file is under version control any run will be checked in with a different ProcessID. This should be avoided.  
  
Is there a way to have the ProcessID found by WMI in the list of information (like WorkingSetSize and others) which are not saved to fbp7 file?  
  
Best regards  
Michael

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [September 24, 2015, 3:59am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593/4 "2015-09-24T03:59:43Z")

</div>

Hi Michael,   
  
I have update the previous build I gave you with a new member on the action, ProcessFoundID. This member will never be saved to the project and will always be updated with the located process’s ID. The ProcessID will no longer be updated, and will only ever hold the value entered by the user in the action dialog.   
  
Please note that his build is separate to the 8.0.0.1182 build I have given you. I would like to make sure that this functionality change is correct before merging into the main code base. Please let me know everything is working as you would expect and I will make another release with this change merged.

```
[http://downloads.finalbuilder.com/d…0\_1177.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_1177.exe)
```

---

<div class="post-metadata">

### Author: ![michael.jelich](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/c57346/32.png) [@michael.jelich](https://www.finalbuilder.com/forums/u/michael.jelich)
#### Post date: [September 24, 2015, 10:06am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593/5 "2015-09-24T10:06:15Z")

</div>

Hi Jason,

thank you for your answer.

Unfortunately I cannot test the new build because our license upgrade agreement is not renewed. Probably I'll check it today evening at home where I already renewed the subscription and then get back to you.

Best regards  
Michael

---

<div class="post-metadata">

### Author: ![finalbuilder](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/f/d07c76/32.png) [@finalbuilder](https://www.finalbuilder.com/forums/u/finalbuilder)
#### Post date: [September 24, 2015, 8:11am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593/6 "2015-09-24T08:11:50Z")

</div>

Hi Jason,  
  
I have tested Build 1177. Well done - it works fine. The ProcessFoundID is the correct Process ID of the process searched by name and no change is made to the project file.  
  
Thank you for your assistance.  
  
Best regards  
Michael

---

<div class="post-metadata">

### Author: ![nevar](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/n/c4cdca/32.png) [@nevar](https://www.finalbuilder.com/forums/u/nevar)
#### Post date: [September 25, 2015, 4:19am UTC](https://www.finalbuilder.com/forums/t/wmi-process-info/3593/7 "2015-09-25T04:19:32Z")

</div>

I will merge this change into the release we are making today then. Thank you for reporting back so quickly.
