Reputation: 351
I have an earlier version of our product (v 3.01.x.y) installed. When installing the new version (3.31.x.y) which is a bundle with a few packages inside, it installs successfully with no errors in the log and the Add or Remove Programs shows the new version as well as the PackageCache has the msi sitting there, however, the new files from the main package StudioInstallerMSI are not copied to the target folder on the destination, the folder is missing at all. Below is the budle.wxs file content:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<?include $(var.SolutionDir)\StudioInstaller\StudioInstaller\Variables.wxi?>
<Bundle Name="$(var.SciFullProductName)"
Version="!(bind.packageVersion.StudioInstallerMSI)"
Manufacturer="!(bind.packageManufacturer.StudioInstallerMSI)"
UpgradeCode="$(var.UpgradeCode)"
IconSourceFile="$(var.ProjectDir)\..\StudioInstaller\Resources\STUDIO.ICO">
<WixVariable Id="PrerequisitesDirectory" Value="Prerequisites\" />
<Variable Name="BA_SciProductName" Value="$(var.SciProductName)" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile=".\Resources\EULA.rtf"
LogoFile=".\Resources\Banner.jpg"
ThemeFile="$(var.SolutionDir)\SciWixLibrary\SciBaseTheme.xml"
LocalizationFile="$(var.SolutionDir)\SciWixLibrary\SciBaseTheme.wxl" />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="NetFx48Redist" />
<PackageGroupRef Id="VCRedist_x64" />
<PackageGroupRef Id="SqlLocalDB_x64" />
<PackageGroupRef Id="FLMInstallerMSI" />
<MsiPackage Id="StudioInstallerMSI" SourceFile="$(var.StudioInstaller.TargetPath)" Vital="yes" Compressed="yes">
<MsiProperty Name="BUNDLE_UI_LEVEL" Value="[WixBundleUILevel]" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>
And the content of the main wxs file of the main package StudioInstallerMSI is below:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)\Variables.wxi?>
<?include $(sys.CURRENTDIR)\..\..\SciWixLibrary\SharedVariables.wxi?>
<Product Id="*" Name="$(var.SciProductName)" Language="1033" Codepage='1252' Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package Id='*' Keywords='Installer' Description="$(var.SciProductName) v. $(var.ProductVersion) Installer"
Comments='$(var.SciProductName) is a registered trademark of $(var.Manufacturer)' Manufacturer='$(var.Manufacturer)'
InstallerVersion='500' Languages='1033' Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade AllowSameVersionUpgrades="yes" AllowDowngrades="no" DowngradeErrorMessage="A newer version of [ProductName] is already installed." Disallow="no" Schedule="afterInstallInitialize" />
<MediaTemplate EmbedCab="yes" />
<!-- The upgrade code of the old legacy product used in the InstallShield based installers -->
<Upgrade Id="9BEACA3B-D4F4-45E6-A288-509C608CF1A6">
<UpgradeVersion OnlyDetect='no' Property='OLD_IS_PRODUCTCODE' Maximum='3.0.0.0' IncludeMaximum='no' IgnoreRemoveFailure='no' />
</Upgrade>
<Feature Id="StudioComponents" Title="Sciemetric Studio Components" Level="1">
<ComponentGroupRef Id="HarvestedSTComponents" />
<ComponentRef Id="cmpRemoveSTUnversionedFiles" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="SystemFolder" />
<Directory Id="ProgramFiles64Folder">
<Directory Id="SciemetricDIR" Name="Sciemetric">
<Directory Id="SciStudioDIR" Name="Sciemetric Studio" />
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
The same outcome is for the other secondary package FLMInstallerMSI, which also gets upgraded to the latest version in the Add or Remove Programs, however, in this case the previous version files stay the same and not replaced with the new version files from that package.
Could you please help understand what am I missing here? If I uninstall the previous version and install the new version everything is installed successfully and no file is missing. Only the major upgrade that causes this issue.
Additional observation info: the bundle is OK, since I installed the previous version and then installed only the main MSI package StudioInstallerMSI, which uninstalls the previous version, I can see how it creates the destination folder and copies the new files, but then in a split second after it deletes the target folder again. Hope this helps.
Upvotes: 0
Views: 84