For the longest time I have had a wix msi and bundle that I could upgrade or downgrade without having to uninstall first, before installing the version I want to test.
Now it seems if a previous install exists, the bundle (or msi) will remove the files from the previous install, and mark the program installed in ARP. In this state, I have to uninstall and then reinstall in order to get the files and mark the program installed in ARP. If I install on a system without the program, everything installs as expected. This behavior change seems to coenside with my building the program with dynamic linking (vs. static linking), which called for the inclusion of Microsoft Redistributables. It is very handy for a user to just install without having to un-install first, so i would like to keep that experience. Bellow find my msi and bundle wxs files. ----------------------- MyProgram.wxs (msi) ----------------------- <?xml version="1.0" encoding="UTF-8"?> <?include $(var.wxi_variables) ?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" > <Product Id="*" Language="1033" Manufacturer="$(var.MyCompanyName)" Name="$(var.MyInstallerName)" UpgradeCode="{$(var.Guid_Upgrade)}" Version="$(var.Version)" > <!-- Main packed declaration --> <Package Comments="$(var.MyCompanyNameShort) - $(var.MyProductName) $(var.Version) Installation" Compressed="yes" Description="$(var.MyDescription)" InstallerVersion="301" /> <!-- How data is packed inside the msi --> <!-- <Media Id="1" Cabinet="contents.capab" EmbedCab="yes" /> --> <MediaTemplate EmbedCab="yes"/> <!-- Directory Structure --> <Directory Id="TARGETDIR" Name="SourceDir"> <Merge Id="VCRedist" Language="0" DiskId="1" src="$(env.CommonProgramFiles(x86))\Merge Modules \Microsoft_VC100_CRT_x86.msm"/> <Directory Id="ProgramFilesFolder" Name="Pfiles"> <Directory Id="MYPRODUCTSDIR" Name="$(var.MyCompanyNameShort)" ShortName="livl8li5"> <Directory Id="INSTALLDIR" Name="$(var.MyProductName) $(var.Version)" ShortName="rclggtos"> </Directory> </Directory> </Directory> </Directory> <!-- Install the Visual C++ Redistributable with your installer --> <Feature Id="VCRedist" Title="Visual C++ Runtime" AllowAdvertise="no" Display="hidden" Level="1"> <MergeRef Id="VCRedist"/> </Feature> <!-- Files --> <Feature Id='Complete' Level='1'> <!-- Pulls in fragment file created by heat.exe or Paraffin3.1 --> <ComponentGroupRef Id='group_ProductFiles'/> <!-- Pulls in fragment file to creat Shortcut & Program File Icons & File association --> <ComponentRef Id="ProgramFileShortcuts" /> <ComponentRef Id="DesktopShortcuts" /> <ComponentRef Id="FileAssociations" /> </Feature> <!-- Add Remove Programs metadata --> <Property Id="ARPHELPLINK" Value="$(var.HelpUrl)" /> <Property Id="ARPURLINFOABOUT" Value="$(var.AboutUrl)" /> <Icon Id='Compass.ico' SourceFile="$(var.ProdIcon)"/> <Property Id="ARPPRODUCTICON" Value='Compass.ico' /> <!-- Using the Wix UI library --> <Property Id="WIXUI_INSTALLDIR">INSTALLDIR</Property> <!-- Icons for the installer --> <WixVariable Id='WixUIBannerBmp' Value='$(var.InstallBanner)' /> <WixVariable Id='WixUIDialogBmp' Value='$(var.InstallDialog)' /> <WixVariable Id="WixUILicenseRtf" Value="$(var.EULArtf)" /> <!-- Allow per user or per machine --> <WixVariable Id="WixUISupportPerUser" Value="1" /> <Property Id="ApplicationFolderName" Value="$(var.MyCompanyNameShort)\$(var.MyProductName) $(var.Version)" /> <Property Id="WixAppFolder2" Value="WixPerMachineFolder" /> <Property Id="WixAppFolder" Value="WixPerMachineFolder" /> <UIRef Id="WixUI_MyInstallDir" /> <UIRef Id="WixUI_ErrorProgressText" /> <!-- Major Update --> <MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallValidate" /> <!-- Always allow Upgrades and Downgrades --> <Upgrade Id="{$(var.Guid_Upgrade)}"> <UpgradeVersion Minimum="$(var.Version)" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" /> <UpgradeVersion Minimum="0.0.0" Maximum="$(var.Version)" IncludeMinimum="no" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" /> </Upgrade> </Product> </Wix> --------------------------------- MyProgram.bundle.wxs (burn bundle) ---------------------------------- <?xml version="1.0" encoding="UTF-8"?> <?include $(var.wxi_variables) ?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" > <Bundle Name="$(var.MyInstallerName)" Version="$(var.BundleVersion)" Manufacturer="$(var.MyCompanyName)" Copyright="$(var.Copyright)" UpgradeCode="$(var.Guid_Bundle)" HelpTelephone="$(var.HelpPhone)" HelpUrl="$(var.HelpUrl)" UpdateUrl="$(var.UpdateUrl)" AboutUrl="$(var.AboutUrl)" Condition="( (VersionNT >= v5.1) AND (ServicePackLevel >= 3)) OR ( (VersionNT >= v5.2) AND (ServicePackLevel >= 2)) OR (VersionNT >= v6.0)" IconSourceFile="$(var.ProdIcon)" > <!-- Icons for the installer --> <WixVariable Id='WixUIBannerBmp' Value='$(var.InstallBanner)' /> <WixVariable Id='WixUIDialogBmp' Value='$(var.InstallDialog)' /> <WixVariable Id="WixUILicenseRtf" Value="$(var.EULArtf)" /> <!-- Display License and Logo The URL is to the EULA embeded in the installer --> <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" > <bal:WixStandardBootstrapperApplication LicenseUrl="EULA.html" LogoFile="$(var.ProdIcon)" SuppressRepair="yes" SuppressOptionsUI="yes" /> <Payload Name="EULA.html" SourceFile="$(var.EULA)"/> </BootstrapperApplicationRef> <!-- BEGIN Conditional Def --> <!-- Check if WinPcap is installed and at least some version --> <util:RegistrySearch Id="RegistrySearchWinPcapHas" Variable="WinPcapInstalled" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall \WinPcapInst" Result="exists" /> <util:RegistrySearch Id="RegistrySearchWinPcapMajor" Variable="WinPcapVersionMajor" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall \WinPcapInst" Value="VersionMajor" Format="raw" Result="value" /> <util:RegistrySearch Id="RegistrySearchWinPcapMinor" Variable="WinPcapVersionMinor" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall \WinPcapInst" Value="VersionMinor" Format="raw" Result="value" /> <!-- Check if Bounjour Print Services is installed --> <util:RegistrySearch Id="RegistrySearchBonjourHas" Variable="BonjourDLL" Root="HKLM" Key="SOFTWARE\Classes\AppID\Bonjour.DLL" Result="exists" /> <util:RegistrySearch Id="RegistrySearchBonjourValue" Variable="BounjourVersion" Root="HKLM" Key="SOFTWARE\Apple Inc.\Bonjour" Value="Version" Format="raw" Result="value" /> <!-- Check if Avdeccproxy 1.0.4 is installed --> <util:RegistrySearch Id="RegistrySearchProxyHas104" Variable="ProxyInstalled104" Root="HKLM" Key="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion \Uninstall\{8F998340-1EC5-41A0-AB27-F437669648C0}" Result="exists" /> <!-- END Conditional Def --> <!-- Begin Chain --> <Chain> <!-- Will not install if 2.0.2.0 or better is installed If installing download from the Internet --> <ExePackage Id="BonjourPSSetup" Name="BonjourPSSetup.exe" Vital="no" Compressed="no" DownloadUrl="http://support.apple.com/downloads/DL999/en_US/BonjourPSSetup.exe" InstallCondition="NOT BonjourDLL OR v2.0.2.0 > BonjourVersion" Permanent="yes" > <RemotePayload ProductName="BonjourPrintServices" Description="Bonjour Printer Services Installer" Size="5436744" Version="2.0.2.0" Hash="847f39e0ea80d2a4d902fe59657e18f5bc32a8cb" /> </ExePackage> <!-- Will not install if 4.1.3 or better is installed If installing, download from Internet --> <ExePackage Id="WinPcap" Name="WinPcap_4_1_3.exe" Vital="no" Compressed="no" DownloadUrl="http://www.winpcap.org/install/bin/WinPcap_4_1_3.exe" InstallCondition="NOT WinPcapInstalled OR ( 4 > WinPcapVersionMajor AND 1 > WinPcapVersionMinor)" Permanent="yes" > <RemotePayload Description="WinPcap 4.1.3 installer" Hash="e2516fcd1573e70334c8f50bee5241cdfdf48a00" ProductName="WinPcap 4.1.3" Size="915128" Version="4.1.0.2980" /> <!-- Will always install --> <MsiPackage Id="MyProgramInstaller" Name="$(var.MyProductNameMsi)" DisplayName="Compass $(var.Version)" Description="Compass $(var.Version) Installation" DisplayInternalUI="yes" EnableFeatureSelection="yes" Vital="yes" Visible="no" ForcePerMachine="yes" Cache="yes" Compressed="yes" Permanent="no" SourceFile="$(var.MyProductNameMsiSrc)" /> </Chain> </Bundle> </Wix> NOTICE: This email may contain confidential information. Please see http://www.meyersound.com/confidential/ for our complete policy. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users