I have a project which I want to build from the command line. This project has a number of compiler variables that I want to set using the normal VARIABLE=VALUE method on the command line. In some cases I want to use spaces in these variables but I haven't been able to make that work properly.
The scenario is the following, I normally build using something similar to this:
miabuild myproject.mpr PRODUCTNAME=MySoftware
This works fine. However, when I want to build something like this:
miabuild myproject.mpr PRODUCTNAME=MySoftware Special Edition
it doesn't work. I've tried putting whole variable expression inside quotes ("PRODUCTNAME=MySoftware Special Edition") as well as just the string (PRODUCTNAME="MySoftware Special Edition") but without luck.
What happens is that I get an installer package that mostly looks right but when running it I get an error during the installation phase. It says:
A portion of the folder path" is invalid. It is either empty or exceeds the length allowed by the system.
This variable is used all over the place, including the title field and some create shortcut commands but I haven't been able to pinpoint which command it fails on.
If I use the project properties dialog to edit the compiler variable it works fine using the spaces. Does anyone know how I should do this?
I have a log file from the installation if there is any interest in seeing it but it contains a bunch of names and stuff so I'd rather not post it in its entirety. If you would like to see it I can email it or if there is any particular section of interest I could put it up here. I've attached an image of the error as well.
Thanks in advance.
File Attached:
iaerror.jpg
Building from cmd line with space in compiler variable
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
This is simply an error in passing command line parameters. The operating system separates/parses command line parameters by spaces. If you would like to include parameters with spaces, then enclose the entire parameter string inside double quotes. So for instance, myapp.exe param1 "long param 2" param3 will pass three command line variables; excluding the double quote characters will pass five command line parameters instead, producing an undesired result.
So in InstallAware, use the similar form "VARIABLE=VALUE".
So in InstallAware, use the similar form "VARIABLE=VALUE".
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:

