VMware Cloud Community
FreddyFredFred
Hot Shot
Hot Shot
Jump to solution

pass parameters to run in guest workflow

I'm using the run in guest workflow to run a batch file in Windows and it's working fine. I would like to pass a parameter but it always seems to fail.

I tested my batch file locally and when i call it from the command line and pass a parameter, it works fine.

Is there some trick to making it work in vCO?

Thanks

0 Kudos
1 Solution

Accepted Solutions
ChristianWehner
VMware Employee
VMware Employee
Jump to solution

Hi FreddyFredFred,

we are using the "Run Program In Guest" WF and could run a batch with arguments like following:

programPath: "C:\Windows\System32\cmd.exe"

programArguments: "C:\abc\def.bat 'argument1' 'argument2'"

programEnvironVars: NULL

programWorkingDir: "C:\abc"

You could try the same. Maybe you need the arguments like this: "/C C:\abc\def.bat 'argument1' 'argument2'"

Regards,

Chris

View solution in original post

0 Kudos
3 Replies
ChristianWehner
VMware Employee
VMware Employee
Jump to solution

Hi FreddyFredFred,

we are using the "Run Program In Guest" WF and could run a batch with arguments like following:

programPath: "C:\Windows\System32\cmd.exe"

programArguments: "C:\abc\def.bat 'argument1' 'argument2'"

programEnvironVars: NULL

programWorkingDir: "C:\abc"

You could try the same. Maybe you need the arguments like this: "/C C:\abc\def.bat 'argument1' 'argument2'"

Regards,

Chris

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

I'm using it without explicitly running cmd.exe. Something like:

program path:  C:/mycmd.bat

arguments:      myarg

working dir:      C:/

environment:    <not set>

and it works just fine.

FreddyFredFred
Hot Shot
Hot Shot
Jump to solution

Thanks for the help. It seems to be working now.

I think my problem may have been not including the working directory originally.

0 Kudos