Capture process output using command prompt

Prema

New Member
Hi All,

Below is the command I used to run BP process from cmd prompt by passing start parameters also. This worked well

C:\Program Files\Blue Prism Limited\Blue Prism Automate>automatec /run Addition /user madhu.kurakala test@123 /startp "<inputs><input name='Input1' type='number' value='50'/><input name='Input2' type='number' value='60'/></inputs>

But, I'm unable to capture the output of this process into any variable.

I tried the below way

C:\Program Files\Blue Prism Limited\Blue Prism Automate>set out=automatec /run Addition /user madhu.kurakala test@123 /startp "<inputs><input name='Input1' type='number' value='50'/><input name='Input2' type='number' value='60'/></inputs>

C:\Program Files\Blue Prism Limited\Blue Prism Automate>echo %out%

But out is displaying as automatec /run Addition /user madhu.kurakala test@123 /startp "<inputs><input name='Input1' type='number' value='50'/><input name='Input2' type='number' value='60'/></inputs>

please help if anyone knows the way to capture the output of BP process using cmd prompt
 

HakanEngman

New Member
Hi, Probably you already solved this, but as your example gave inspiration and I thought I should at least try answer.

It looks like you run from a CMD.exe prompt and maybe that is not very easy to catch the output. Powershell example would mabye look something like this.

PS> $execution = & AutomateC.exe <all your parameters in your example.>
PS> $session = $execution -split ":" | select -last 1
PS> AutomateC.exe /sso /dbconname <yourconn> /getlog $session

But thanks for your example, it really cleared things up on how to.
 
Top