PDA

View Full Version : Execute Process response to variable



dge0266
05-01-2006, 10:20 AM
The documentation says that when you execute a process the response can be saved in a variable. Quote "The output of the process itself can also be saved in a file or variable." Can someone tell me how do do this? I can pipe the error code to a variable but I can not figure how to feed the response from my command to a variable. Thanks.

enanrum
05-02-2006, 11:51 AM
I think this is what your looking for - if you are running an 'Execute Process' you can set the property 'Process Exit Code Variable' to something like 'RETURN_CODE'

Then you could set up a 'Custom Action' after you 'Execute Process' in the sequence view and reference the variable using: resolveString($V(RETURN_CODE)).



Regards,
Tom

dge0266
05-03-2006, 07:14 AM
Thanks for the reply.

I am finding that the 'Process Exit Code' just gives me an exit code like '0' but not the response from the command I executed?

Barry Lawson
05-03-2006, 09:48 AM
If you are talking about Windows bat files, I have found that putting an "exit N" at the end causes N to be assigned to the Exit Code Variable.

dge0266
05-03-2006, 10:41 AM
No. This is on Linux.

I am just trying to get the response from a command brought into a variable. The documentation says it does this but I can not figure out how????