July 9, 2014 at 8:16 am
I've got a series of Execute Process Tasks whose arguments and executable fields I would like to populate dynamically, using variables. (The reason for this is to make the package portable). Literal strings work, but when I try to pass these same strings to the Arguments and Executable fields in the form of expressions the fields remain blank and the task is un-executable.
for Executable:
Expression: @User::executable (string type) evaluates to c:\Program Files\PS Tools\psexec.exe
For Arguments field, I've concatenated several variables which evaluate to a string argument.
Expression: @User::servername + " " + @User::ServicePath + " " + @User::reloadPathQVDocs + "Name.xxx" evaluates to proper string.
Evaluate as Expression set to True in Properties for each variable as well.
How do I make the source of the Executable and Arguments fields use the expressions that I built for them in the expressions tab????
July 10, 2014 at 9:02 am
I believe that your problem is your variables are set to be expressions.
In your example the variables are not expressions, so when the variable is being evaluated it becomes an empty string.
As long as the expressions shows up in the Execute Process task properties expressions dialog, the task will use the variable values.
July 12, 2014 at 1:37 pm
The problem resolved when I provided 'place holder' values in the executable and arguments fields. I was leaving them blank, since I thought that they would populate with the expressions I built for them in the expressions tab. But, it turns out they have to be populated with hard coded values the first time they are run, even if it's just C:\foo. Then, at run time, they are replaced with whatever the expressions resolve to.
though many sites advise toggling the Evaluate as Expression to true. It didn't make any difference in my case, whether true or false.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply