Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Don't Change Product Code at Build Time

Is there a way to disable a new product code from being generated with every build?

I have tried using command line:
AdvancedInstaller.com /edit project.aip /SetProductCode -langid 1033 -guid {0000000000000} then build the projects in the solution with msbuild, but it changes it again during build time.

I need three different projects to have the same product code. A 32bit and 64bit msi and an exe. The version is being retrieved from a dll and I can't hardcode the version as it needs to match the rest of our installs.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Don't Change Product Code at Build Time

Hi,

In order to keep the Product Code you can use the "-noprodcode" switch along with the "/SetVersion -fromfile" command.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Collins
Posts: 138
Joined: Wed Oct 12, 2016 2:57 pm

Re: Don't Change Product Code at Build Time

Thank you, that worked:
"C:\Program Files (x86)\Caphyon\Advanced Installer 14.9\bin\x86\AdvancedInstaller.com" /edit "Pathtoproject\Project.aip" /SetVersion -fromfile C:\pathtofile\FileName.exe -noprodcode

It would be very helpful to have an option through the project UI or aiproj to automate this.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Don't Change Product Code at Build Time

You're welcome Les. I'm glad you got this working.

We'll consider your suggestion for adding an UI option to automate this, but for the moment there are not immediate plans. Thank you for your suggestion.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”