XOJO ignoring arguments when running an EXE from shell

I am trying to execute a small EXE I have written (not from XOJO) that has an argument switch. Although it is working perfectly when I launch it manually from the CMD prompt with the argument, I can’t get XOJO to launch it correctly using the Shell. I have even removed the “/” that I normally use before the argument, in case it was causing issues, but no luck. Here is a couple of examples of how I’ve tried it. “CSV” is the argument.

s.Execute ("%TEMP%\PACKAGED_SOFTWARE_FOLDER\Parse_Package_List.exe CSV")

and

s.Execute ("""%TEMP%\PACKAGED_SOFTWARE_FOLDER\Parse_Package_List.exe"" CSV")

Any ideas?

Try putting them in the Arguments property.

Can you explain?

Documentation for the Arguments property of Shell

OK, so I added

s.Arguments = "CSV"

and

s.Arguments = " CSV"

But I have the same issue.

Var shllpth As String = "%TEMP%\PACKAGED_SOFTWARE_FOLDER\Parse_Package_List.exe"
Var argStrng As String = "CSV"
s.Execute(shllpth,argStrng)
1 Like

That worked! Thank you very much!