Setting an install's Product Version programatically
Setting an install's Product Version programatically
Is it possible to set a project's product version by a compiler variable or other means? We are trying to automate the generation of our installs, and having to update the product version from the GUI makes this difficult at best.
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
Sure, you can use Compiler Variables for the version field. Just remember to dereference the variable in the form #Variable#
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
If I enter e.g. #MY_VERSION# into the Product Version field in Project Properties, a message pops up:
I guess this would be safely ignored, because the following procedure works:
In Compiler Variables, I have defined MY_VERSION and assigned it a default value.
Then, I build the IA project with the following command line:
and the build completed successfully, with the expected version indicated when I open properties for the generated installer exe.
Incorrect Product Version Value
Only numbers and periods are allowed in this field.
I guess this would be safely ignored, because the following procedure works:
In Compiler Variables, I have defined MY_VERSION and assigned it a default value.
Then, I build the IA project with the following command line:
miabuild.exe myproject.mpr /b=0 MY_VERSION=1.2.3.456
and the build completed successfully, with the expected version indicated when I open properties for the generated installer exe.
-
- Site Admin
- Posts: 364
- Joined: Mon Jul 30, 2007 11:51 am
- Location: USA
- Contact:
If you read the help file contents topic "Using Compiler Variables" you will see:
Therefore the error message cannot be considered a bug
You can always use compiler variables where regular string expressions are allowed, even if regular (script) variables have been prohibited.
Therefore the error message cannot be considered a bug
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 157 guests