0
votes

I am creating a language package installer by using WIX. I'm almost done except one thing. When newer version of the installer is running after an old version of the same installer has been installed, the Install button still shows "Install", but I expect it shows "Upgrade" when the newer installer is running. After the installation of new installer, the new version has been installed and the old version has been removed. That means the upgrade feature aspect has been accomplished. But I hope the UI especially the button text could be changed accordingly.

I'm using bootstrapper project to bundle the msi language package file which is building from wix setup project, and using the standard UI "WixStandardBootstrapperApplication" linked to a UI definition xml file. I have tried to add a "Upgrade" page in the UI definition xml file, it does not work for me and I do not know how to detect the Upgrade process in bootstrapper project. Here is my code.

<BootstrapperApplicationRef 
 Id="WixStandardBootstrapperApplication.HyperlinkLicense">
  <bal:WixStandardBootstrapperApplication
      LicenseUrl=""
      ThemeFile="HyperlinkTheme.xml"
      LocalizationFile="HyperlinkTheme.wxl"
      LogoFile="Logo128.jpg"
      SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>

<Chain>
  <MsiPackage Id="InstallationMSI"
              SourceFile="..\..\..\LanguageSetupV3\bin\Debug\en-us\LanguagePackage.msi"
              EnableFeatureSelection="yes"
              DisplayInternalUI="no"
              Compressed="default"
              Description="[UpgradeByUninstallInstall][IsTypicalInstall]"
              />
</Chain>

<Page Name="Install">
  <Text X="11" Y="121" Width="-11" Height="51" FontId="3" DisablePrefix="yes">#(loc.InstallMessage)</Text>
    <!--<Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="51" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
    <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox> -->
    <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
    <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
    <Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCancelButton)</Button>
</Page>

I wanna know how to detect the upgrade process in bootstrapper project and how to change the button text according to a property value. Or how could I find a property or variable to indicate the difference between Install and Upgrade process. Any links, tutorials or suggestions related to this would be appreciate.

1
Which version do you have inside Bundle element? Try to increase it in a new installer (keep in mind, that MSI uses only 3 first digits in a version) - Pavel Anikhouski
I am using V3 version of bootstrapper project and 1.26.3.1 is my old installer version. The newest version of the installer is 1.26.4.3 in Bundle element. Yes, I have increased the 3rd digit version number of the MSI package and kept the same version number with bootstrapper project. But there is not any changes in UI when I launch my new installer. The button is still displaying "Install". - Kevin Yang

1 Answers

0
votes

In the WixStdBA there is no separate upgrade button defined. The only button seems to be { WIXSTDBA_CONTROL_INSTALL_BUTTON, L"InstallButton" } to start the installation. In the WixStdBA source code I did not find a button named "...UPGRADE..." For upgrading a bundle the new bundle needs to have a higher version number as already discussed above and the bundle upgrade code needs to be constant. It seems to me that it may be necessary to take the WixStdBA source code and modify it in a way that it detects the existence of any previous installations with the same bundle GUID and modify the code that it displays a different button text depending on the installation status.