How to execute a Process Task where the Executable path comes from a user Variable

Viewed 36127

I have an SSIS package that includes a Process Task. The process task needs to execute batch file. The location of the batch file varies depending on the environment (dev, production).

How do I dynamically set tghe value of the Executable property of the Process Task object to a user variable? enter image description hereenter image description here

3 Answers

I know this topic is a bit old, but this is how you would do it.

  1. Instead of editing the Process Task, right-click and click on "Properties"
  2. Once in properties, scroll down to "Expressions"
  3. Next to "Expressions," You will see three dots. Click on the three dots
  4. Add an "Executable" property, and in the expression sections click the three dots to select your variable. You can also add a second property for "Arguments". This is useful if you are running a batch script or powershell script

In my case, I want to call a batch script. The path of the script changes based on the environment I am on. So I have a variable, which will set the correct path of the batch script. I also have another variable for arguments, which also change based on region.

If you now go back to "Edit" your process task, you will see that Executable and arguments are auto-populated

Related