mweintr
Posts: 10
Joined: Mon Sep 22, 2008 7:58 pm

SetVersion increment doesn't work right

We're using the command-line installer to automatically build our project on schedule, with a new build every hour. We are using this script:

Code: Select all

"c:\Program Files\Caphyon\Advanced Installer 7.1.1\AdvancedInstaller.com" /edit "c:\Installer\Project.aip" /SetVersion -increment

"c:\Program Files\Caphyon\Advanced Installer 7.1.1\AdvancedInstaller.com" /build "c:\Installer\Project.aip"
We're currently at version 1.2.1 of our software, and we want each hourly build to be 1.2.1.001, 1.2.1.002, etc. I've tried manually opening the .aip in Advanced Installer and setting the version to 1.2.1.001 before the next hourly build, but the followup version is 1.2.2.

How can I set up the incrementation so that each build is 1.2.1.002, and so forth?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: SetVersion increment doesn't work right

Hello,

Note that the fourth part of your version is ignored, since a four part version is not supported by Windows Installer.
The correct format for a version number is <major>.<minor>.<build>
Here is some information about Product Version: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Your version consists of four parts which is why the "-increment" option does not increment your build number.
The "-increment" option will only increment the third part of your version.

Also note that upon incrementation, the leading zeros of a version part are stripped. If you want to keep the zeros you will have to specifically set the version number through an environment variable in command line.

Code: Select all

"c:\Program Files\Caphyon\Advanced Installer 7.1.1\AdvancedInstaller.com" /edit "c:\Installer\Project.aip" /SetVersion %THEVERSION%
You will have to create some other bat or program that will increment this variable for you.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”