12-19-2008 12:48 PM
I would like to use Launchexecutable to launch the command line compiler. When I try this is seems like the compiler starts up, but the parameters are not getting passed. (the project to compile)
to simplify I put the project in the same directory and the command.exe program:
This works when I run it on windows using the command line utility "RUN":
"C:\Program Files\National Instruments\CVI71\compile" "autogen.prj"
However these do not work:
LaunchExecutableEx("""C:\\Program Files\\National Instruments\\CVI71\\compile"" ""C:\\Program Files\\National Instruments\\CVI71\\autogen.prj""",LE_SHOWNORMAL,&handle);
LaunchExecutable("""C:\\Program Files\\National Instruments\\CVI71\\compile"" ""C:\\Program Files\\National Instruments\\CVI71\\autogen.prj""");
LaunchExecutable("C:\\Program Files\\National Instruments\\CVI71\\compile autogen.prj");
LaunchExecutable("""C:\\Program Files\\National Instruments\\CVI71\\compile"" ""autogen.prj""");
12-21-2008 01:46 AM
in order to help debugging this: write a simple executable that accepts and display the command line parameters. something like:
int main( int argc, char *argv )
{
printf( "%i arguments passed:\n", argc );
for ( i = 0; i < argc; i++ )
printf( "%i: {%s}", i, argv[i] );
return 0;
}
now use LaunchExecutable to run the resulting exe and see what it is receiving as parameters. it should give you a hint on what's going on with your call.
12-22-2008 08:08 AM
Have you tried using:
LaunchExecutable("cmd /c C:\\Program Files\\National Instruments\\CVI71\\compile autogen.prj");
JR
12-22-2008 12:46 PM
Or try:
LaunchExecutableEx("\"C:\\Program Files\\National Instruments\\CVI71\\compile\" \"C:\\Program Files\\National Instruments\\CVI71\\autogen.prj\"",LE_SHOWNORMAL,&handle);
(i.e Use a backslash to escape a double-quote within your string.)
Mert A.
National Instruments