简体   繁体   中英

wix installer upgrade dialog not displaying, how to prepare?

I have installed msi on client location. Now i need to provide upgrade. When i prepare new msi with new version it is saying product is already installed. How to upgrade product.

Existing product msi(wix) info:
ProductVersion      :   0.0.0.1
PackageCode {B3B7B3A9-AF58-41C0-B3BD-F5ED1B5DE914}
UpgradeCode {63B4B483-1851-4F32-BEFA-E7D73C4CE0DE}
ProductCode {1F3EFF43-C480-4956-B076-76437B6313E6}

My wix looks like this.

<?xml version="1.0" encoding="utf-8"?>
<?define ProductVersion = "0.0.0.2"?>
<?define UpgradeCode = "63b4b483-1851-4f32-befa-e7d73c4ce0de"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  <Product Id="*" Name="Calculator" Language="1033" Version="$(var.ProductVersion)" Manufacturer="ABCD" UpgradeCode="$(var.UpgradeCode)">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <Upgrade Id="$(var.UpgradeCode)">
      <!-- Detect older product versions -->
      <UpgradeVersion OnlyDetect="no" IncludeMinimum="yes" IncludeMaximum="yes" Minimum="0.0.0.1" Maximum="$(var.ProductVersion)" Property="PREVIOUSVERSIONSINSTALLED" />
      <!-- Detect newer product versions -->
      <UpgradeVersion OnlyDetect="yes" IncludeMinimum="no" Minimum="$(var.ProductVersion)" Property="NEWERVERSIONDETECTED" />
    </Upgrade>
    <!-- Exits successfully in the case newer version are already installed -->
    <CustomActionRef Id="WixExitEarlyWithSuccess" />

and continues....

Whats wrong in my code. I would like to get upgrade option from this.

It will say the product is already installed if either the ProductCode or the PackageCode of the new MSI is the same as the previous one. It's not clear to me from your post if they have both changed or not.

Also, you won't get an upgrade unless you change something in the first three fields of the ProductVersion. This is the behavior of Windows Installer.

http://msdn.microsoft.com/en-us/library/aa370859(v=vs.85).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM