0
votes

I have the following scripts:

runTest - sets up the environment for a running a python script runEnv - runs a python script that parses a file a starts a program.

I want to write a powerShell command that runs the runTest script and wait for it to return.

In a cmd shell, if I just do

start runTest.bat %ARGS%

It works as expected, that is it return the command once the runTest script returned.

However, if I try the following powerShell command:

Start-Process runTest.bat -ArgumentList $arg1 -Wait

It does not ever return.

What am I missing here ?

1
Why can you not do the environment setup that's run by runTest.bat in your PowerShell script, and then call the Python script from there? - alroc
I'm calling somenone else's script, and I'm not responsible for it. So, if it changes, it should be transparent to my script. - b3bel

1 Answers

0
votes

make sure the arguments are comma separated.
e.g. if %ARGS% expands to a1 a2 a3 $arg1 should bea1,a2,a3