1

I'm trying to open a windowed program from within a HXCPP command line app and I can't get it to work. At the moment I'm only trying to get this to work on Windows.

Part of the problem seems to be that the program is in the Program Files directory and therefore has spaces in the path.

I've tried many things like:

Sys.command(pathToExe);

Sys.command('"' + pathToExe + '"');

Sys.command('cmd /c "' + pathToExe + '"');

Sys.command('cmd', ['/c',  '"' + pathToExe + '"');

Sys.command('start /c "' + pathToExe + '"');

Sys.command('start', ['/c',  '"' + pathToExe + '"');

I've also tried all of these with the sys.io.Process class.

Another problem seems to be that the Sys.command and new Process() APIs seem to escape quotes and slashes by the time they get to the command line. As seen in this output:

'\"C:\Program Files (x86)\ModularTable\ModularTable.exe\""' is not recognized as an internal or external command, operable program or batch file.

Just to be clear, these commands work fine when entered directly into the command line.

Any help?

tbyrne.org
  • 11
  • 1

0 Answers0