othulke
Posts: 27
Joined: Thu Aug 01, 2013 1:51 pm

Command line builds with 19.3 do not update the ProductCode in the AIP when the ProductVersion differs from last build

Wed Apr 20, 2022 4:23 pm

Hi there,

we recently upgraded our build environment from AI 18.4 to 19.3 and are experiencing unexpected behavior.

The setup creation is run entirely on the command line.
With 18.4 each setup build would create a new ProductCode as the product's version is automatically increased during the build (The ProductVersion is being taken from the freshly built program).
After running AI on the command line the AIP file would have been modified to include the new product ID.

Having upgraded to 19.3 the AIP file remains unchanged after the build. When opening the project with the UI a message appears that the ProductVersion property has changed and the ProductCode has been changed.
ProductCode.png
ProductCode.png (26.67KiB)Viewed 1417 times
Is the ProductCode still changed during the build on the command line? How can we get back to the old behavior (automatic update of ProductCode and AIP file) during the build?

Best regards,
Oliver

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Command line builds with 19.3 do not update the ProductCode in the AIP when the ProductVersion differs from last bui

Thu Apr 28, 2022 2:52 pm

Hello Oliver,

Assuming you are changing the ProductVersion through the "SetVersion" command line, then unless you pass the "-noprodcode" command, the ProductCode should be automatically changed.

This behavior has not changed between the two versions you mentioned at all.

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

othulke
Posts: 27
Joined: Thu Aug 01, 2013 1:51 pm

Re: Command line builds with 19.3 do not update the ProductCode in the AIP when the ProductVersion differs from last bui

Fri Apr 29, 2022 9:46 am

Hello Catalin,

the setup creation is run from within a larger batch file. These are the commands that worked as desired up to AI 18.4:
set advinstaller=C:\Program Files (x86)\Caphyon\Advanced Installer 18.4\bin\x86\AdvancedInstaller.com

[omitted]

:: load the path variables
"%advinstaller%" /loadpathvars "%advinstaller_pathvars%"

:: rebuild the setup project
"%advinstaller%" /rebuild "%~4"
if %errorlevel% neq 0 goto ERROR_ADVINSTALLER

:: reset the path variables
"%advinstaller%" /loadpathvars "C:\ProgramData\Caphyon\Advanced Installer\PathVariables.apf"
The setup is configured to use the version number of the main EXE being installed (see screenshot above).
After the build the setup project always contained the version number of the current EXE and a new product ID.
There was no need to run any additional commands, such as "setversion". Has this been changed between 18.4 and 19.3? If so, how do we get back to the previous behavior?

Best regards,
Oliver

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Command line builds with 19.3 do not update the ProductCode in the AIP when the ProductVersion differs from last bui

Wed May 04, 2022 1:12 pm

Hello Oliver,

Thank you for the explanation!

I thought you guys are changing the ProductVersion manually, not extracting it from the EXE file.

Since the ProductVersion will be changed, the ProductCode should also be changed automatically.

Is this not happening for you? I have run some tests just now and it seemed to be working just fine.

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

Return to “Common Problems”