[wix-users] Building Wix project for sameagain
Phill Hogland
phill.hogland at rimage.com
Mon Jan 30 07:54:41 PST 2017
There are many different ways to do this.
One approach is like described here:
http://stackoverflow.com/questions/14139154/using-msbuild-extension-pack-and-assemblyinfo-to-automate-the-version-number-wh
except that rather than writing the info out for use in an AssemblyInfo, you write the details into a .wxl file, as xml, and include the .wxl in your bundle project. The Wix source also has some examples of writing version info to a .wxl file. Generally however this involves writing a MSBuild ITask function and integrating it into your build process. I think Wix has an auto-increment version function (originally defined at https://wixextba.codeplex.com/) , but if you do multiple builds on a single day they will still have the same version and result in multiple arp entries, so I do not use that approach.
Having said the above, about incrementing the bundle's version, none of this will make a MSI use all four parts of the MSI's {Product Version as in your example. That just simply won't work in any MSI context due to Microsoft's design rules.
Phill
________________________________
From: Laique Abbas <laiqueabbas_is at yahoo.com>
Sent: Monday, January 30, 2017 9:03:40 AM
To: Phill Hogland; WiX Toolset Users Mailing List
Subject: Re: [wix-users] Building Wix project for sameagain
Yes i am using Burn Bundle.exe. How can we increment the bundle's version everytime I build?
On Monday, January 30, 2017 7:58 PM, Phill Hogland <phill.hogland at rimage.com> wrote:
If you are using a Burn Bundle.exe (and you have not clarified if you are), then make sure you increment the bundle's version.
If you are talking about using all for parts of a MSI's ProductVersion, as indicated in the documentation Microsoft's design conflicts with your "requirement". The only real solution I know of is for you to change your approach and use the first three parts of a MSI's ProductVersion, ignoring the forth part.
________________________________
From: Laique Abbas <laiqueabbas_is at yahoo.com>
Sent: Monday, January 30, 2017 8:52:21 AM
To: Phill Hogland; WiX Toolset Users Mailing List
Subject: Re: [wix-users] Building Wix project for sameagain
I have found that you will get more than one arp entry for a Bundle.exe if you do not increment any of the four parts between builds. But again Burn does not have any impact on how the msiexec.exe engine processes a MSI ProductVersion string.
Actually this is my problem? how can i resolve this issue as I am also getting more than one arp entry.
Regards,
Laique
On Monday, January 30, 2017 7:45 PM, Phill Hogland <phill.hogland at rimage.com> wrote:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa370859(v=vs.85).aspx
"Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field."
If you are talking about the forth part of the MSI ProductVersion (as your example indicates "then ran the msi for version 1.0.0.1") , then this issue has nothing to do with Burn. You either need to change your "requirement" to conform to MSI rules, or write your own Operatings System and equivalent of msiexec.exe, or have a discussion with Microsoft. There is not anything the wix folks can do about a desire to change the MSI ProductVersion behavior.
If you are using a Wix Burn Bundle.exe to chain your MSIs (which must still conform to the MSI ProductVersion rule of ignoring the forth part of a ProductVersion), the bundle.exe can and does use all four parts of the bundle.exe's version. I have found that you will get more than one arp entry for a Bundle.exe if you do not increment any of the four parts between builds. But again Burn does not have any impact on how the msiexec.exe engine processes a MSI ProductVersion string.
Phill
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Laique Abbas <laiqueabbas_is at yahoo.com>
Sent: Monday, January 30, 2017 3:54:56 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Building Wix project for sameagain
I think burn is creating this issue. The 2 entries in control panel is the problem.Any help?
Regards,Laique
On Monday, January 30, 2017 1:36 PM, Laique Abbas <laiqueabbas_is at yahoo.com> wrote:
To add on this, Its doing upgrade on same version but adding two entries in control panel,
Regards,Laique
On Monday, January 30, 2017 1:17 PM, Laique Abbas <laiqueabbas_is at yahoo.com> wrote:
<Product Id="*" Name="$(var.ScreenAppName)" Language="1033" Version="$(var.Version)" Manufacturer="Afiniti" UpgradeCode="60B8EB97-EEDC-4E3A-A93B-1C83B906FABA"> <Upgrade Id="60B8EB97-EEDC-4E3A-A93B-1C83B906FABA"> <UpgradeVersion Property="REMOVEOLDVERSION" Minimum="0.0.0.0" Maximum="$(var.Version)" IncludeMaximum="yes"/> <UpgradeVersion OnlyDetect="yes" Property="NEWERFOUND" Minimum="$(var.Version)" IncludeMinimum="yes" /> </Upgrade>
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed." Schedule="afterInstallValidate" />
I had a requirement to do versioning on 4th bit of Version too so I wrote the above WIX code. Its working perfectly but there is just one problem. I build the WIX solution and then ran the msi for version 1.0.0.1 and then building the solution again for same version and then running the msi results in installation again though it must just give an uninstall option in this case.I think its because of revision number. Well Is there a way to stop permit running the same version msi again ?
Any help would be appreciated.
Regards,Laique
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list