# Seperate process from list

**URL:** <https://www.finalbuilder.com/forums/t/seperate-process-from-list/4361>\
**Category:** Discussion\
**Created:** [March 24, 2009, 1:24am UTC](https://www.finalbuilder.com/forums/t/seperate-process-from-list/4361 "2009-03-24T01:24:11Z")\
**Posts on this page:** 4\
**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:** [March 24, 2009, 1:24am UTC](https://www.finalbuilder.com/forums/t/seperate-process-from-list/4361/1 "2009-03-24T01:24:11Z")

</div>

Strange one this .....

I have an automise script running that starts various dos windows (Basically batch files to do various tasks), I want to be able to tell one from the others so I can kill it&nbsp; if its still running next time the schedule comes up.

Unfortunatly they are all labled as "C:\windows\system32\cmd.exe".

So is there any way to tell them apart or can i assign them IDs or titles&nbsp;when starting them? Back in the VB days shelling out a process would return its window handle - something like that would be nice..

&nbsp;

Gary H

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [March 25, 2009, 12:59pm UTC](https://www.finalbuilder.com/forums/t/seperate-process-from-list/4361/2 "2009-03-25T12:59:15Z")

</div>

Hi Gary   
  
 The current release doesn’t expose the ProcessID, however I have just added that and I’ll post here when a build is available with that change included (later today). The processID will only be available through scripting, and only if you are not waiting for the process to complete (it doesn’t make sense to deal with the process id once the process has completed).   
  
 So to access it you will need to use some script like this (in the AfterAction script event of the Execute Program Action) :   
  
 MyVariable = Action.ProcessID   
  
 Note that I’m not sure this is going to solve your problem… in that the process id’s will change each time you run them… so you will have to store those id’s somewhere and then check for them again each time the scheduled task runs… but be careful as the process id may be recycled by windows and be used for other processes.

---

<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:** [March 30, 2009, 11:41am UTC](https://www.finalbuilder.com/forums/t/seperate-process-from-list/4361/3 "2009-03-30T11:41:40Z")

</div>

Thanks Vincent, is that build ready for testing yet?   
  
 As the automise process runs continuously I can store the process id off in a variable until next time through the loop.   
  
 Gary H

---

<div class="post-metadata">

**Author:** ![CrockCRD](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/3da27b/32.png) [@CrockCRD](https://www.finalbuilder.com/forums/u/CrockCRD)\
**Post date:** [July 31, 2019, 11:47pm UTC](https://www.finalbuilder.com/forums/t/seperate-process-from-list/4361/4 "2019-07-31T23:47:57Z")

</div>

I found a solution to this (but it may not apply to how you have automise running DOS executes).

I was able to add the “Command line” column to the Window sTask Manager and follow the path to the project that is running at the time. As you know, you can’t get into the project via Automise while it’s running, but you may be able to isolate the ATCMD.exe Images in the Task Manager by going to:

1. Open Windows Task Manager (on the server you have Automise running)
2. View \> Add Columns
3. Check off the box marked “Command Line”

This shows the folderpath and file of the Automise Project you have running.
