Expand environemnt variables for script and parameters