Run Program and Command Line Arguments
Posted: Wed Aug 15, 2007 4:04 pm
I'm making extensive use of the Run Program command in IA and I need to pass several command line arguments. Generally, my first parameter is the value $TARGETDIR$ followed by a trailing backslash, and that is followed by various options that make my EXE do different things. The problem I'm having is that it's difficult to get it to pass all the parameters correctly - they all get run together as one parameter (I have debug code in the EXE to print out the argument list).
Rather than put a bunch of examples here, I'd like to know exactly how InstallAware separates one paramater from the next. Or does it pass the string directly to the shell (after expanding any embedded variables)? The help topic has insufficient detail. I've tried using quotes "" to surround things with spaces in them (like TARGETDIR's value), and that actually appears to be part of the problem - what I see in my debug output is just one quote and the whole argument list is run together (like it's an unclosed quote).
Another thing that's very odd, is that the behavior seems to be different when I'm running as an upgrade versus running a fresh install. That may have something to do with the value of TARGETDIR though - which I am setting to the folder path where the older version is installed.
Rather than put a bunch of examples here, I'd like to know exactly how InstallAware separates one paramater from the next. Or does it pass the string directly to the shell (after expanding any embedded variables)? The help topic has insufficient detail. I've tried using quotes "" to surround things with spaces in them (like TARGETDIR's value), and that actually appears to be part of the problem - what I see in my debug output is just one quote and the whole argument list is run together (like it's an unclosed quote).
Another thing that's very odd, is that the behavior seems to be different when I'm running as an upgrade versus running a fresh install. That may have something to do with the value of TARGETDIR though - which I am setting to the folder path where the older version is installed.