Skip to main content
Question

Pass published parameter to command prompt

  • February 26, 2018
  • 1 reply
  • 53 views

Hi,

I am running a workbench which uses system caller to run a bat file ad that bat file in turn runs a exe file. When I run the workbench from any location other than the same folder as the bat and exe files it fails to execute. What I want to know is how can I pass through a published parameter value to the command prompt temp variable %%1 so I can set a folder for it to be run from?

Thanks,

Clare

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • February 26, 2018

Hi @clareeaston You probably need to use "cd /d <dir>" in your batch script. Please see pass-pub-param.fmwt which has two published parameters in the SystemCaller, one for the batch file and the other for the batch file parameter pointing to the directory to run the executable from.