mirza
Posts: 9
Joined: Wed Jan 13, 2016 3:11 am

Include build Id in product version

By default the product version is as following in the .aip file

<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>

I need to include build Id (i.e. BuildIDx) in the product version. If I include in the product details through GUI, it gave the error "The specified version is not supported. A valid version has been generated and set"
I manually changed the .aip file in text editor to following and compiled on command prompt and it worked and generated the required .msi file.

<ROW Property="ProductVersion" Value="1.0.0-BuildID1" Type="32"/>

I build using the same .aip file again with new build iD (i.e. BuildID2) after making following change (also manually changed the "ProductCode" to avoid "Another version of this product is already installed" problem.)

<ROW Property="ProductVersion" Value="1.0.0-BuildID2" Type="32"/>

Then required .msi is generated and perfectly update the existing installation (BuildID1) on the target machine with (BuildID2).

The next and actual problem is that, now I can see two installations in the add/remove programs i.e. MyProgram version 1.0.0-BuildID1 and MyProgram version 1.0.0-BuildID2. Whereas there is actually only one installation (1.0.0-BuildID2) as there is only one .exe (BuildID2) in the installation directory. If I uninstall MyProgram version 1.0.0-BuildID1 from add/remove programs then it does nothing and actual un-install is performed when I un-install version 1.0.0-BuildID2.

Questions:
1. Why we cannot include build ID in the product version, whereas it is common practice.
2. Why I am having two programs shown in add/remove programs.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Include build Id in product version

Hello,

1. This is a limitation imposed by Advanced Installer because it is quite uncommon to use any other characters than digits in the "ProductVersion" property. Also, using such a product version (i.e. 1.0.0-BuildID1) is against Windows Installer ICE24 which recommends only digits to be used for ProductVersion property.

2. This is because you didn't change the ProductCode property too. Please take a look on the "Changing the Product Version" article.

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mirza
Posts: 9
Joined: Wed Jan 13, 2016 3:11 am

Re: Include build Id in product version

I explored more the command line options and found following command that can meet my needs.

/SetVersion -increment

As per the ICE24 specifications, the build version has maximum value of 65535
https://msdn.microsoft.com/en-us/librar ... s.85).aspx

Now when I run /SetVersion -increment command on following

<ROW Property="ProductVersion" Value="1.0.65534" Type="32"/>

It is updated to

<ROW Property="ProductVersion" Value="1.0" Type="32"/>

Ideally, now product version should be 1.1.0 instead of 1.0

Now, when I run /SetVersion -increment again the product version becomes 1.1 whereas I want product versions to be incremented as following (as per ICE24 too)

1.0.65534 => 1.1.0 => 1.1.1 => 1.1.2 .... (expected and required behaviour)

currently /SetVersion -increment is doing as following

1.0.65534 => 1.0 => 1.1 => 1.2 .... (current behaviour)

How can I achieve 1.0.65534 => 1.1.0 => 1.1.1 => 1.1.2 in an automated build process.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Include build Id in product version

Hello,

Indeed, this seems to be an Advanced Installer issue, thank you for bringing this to our attention. A fix will be available in a future version of AI. We will notify you as soon as the fix will be out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: Include build Id in product version

Hello,

This was fixed in version 16.1 of Advanced Installer, released on July 2nd, 2019.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”