none
Wix installer upgrade with same “upgrade code” ID shows privilege error prompt RRS feed

  • Question

  • I have developed the windows service and created the installer [msi] using Wix toolset, then distributed to users. it is working as expected. Let's name this msi as version 1.0.0.0

    Now, it's time to deliver a new build with service enhancements. Hence, I have created a new msi. Let's name it version 2.0.0.0 . I was hoping that the execution of new msi shall upgrade the existing application.

    But I get below error, basically, it's unable to start the service

    Here is the code from 1.0.0.0

      <?define UpgradeCode = "{3D197FE4-86DF-31FD-A0CD-21B5D3B97ABC}" ?>
      <Product Id="$(var.ProductCode)" 
           Name="!(loc.ProductName_$(var.Platform)) $(var.ProductVersion)"
           Language="!(loc.Language)" 
           Version="$(var.BuildVersion)"
           Manufacturer="!(loc.Company)" 
           UpgradeCode="$(var.UpgradeCode)">

    Here is the code from 2.0.0.0

      <?define UpgradeCode = "{3D197FE4-86DF-31FD-A0CD-21B5D3B97ABC}" ?>
      <Product Id="$(var.ProductCode)" 
           Name="!(loc.ProductName_$(var.Platform)) $(var.ProductVersion)"
           Language="!(loc.Language)" 
           Version="$(var.BuildVersion)"
           Manufacturer="!(loc.Company)" 
           UpgradeCode="$(var.UpgradeCode)">
    
            <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" 
    Schedule="afterInstallInitialize"/>

    If you observe, I kept the upgradecode same as 1.0.0.0. As per https://wixtoolset.org/documentation/manual/v3/howtos/updates/major_upgrade.html

    If I change the upgradecode guid then I do not see any issues. Installation works fine. But changing the upgradecode guid will not remove the old build during upgrade. I mean, i see both 1.0.0.0 and 2.0.0.0 in control panel.It's installing one more version side by side :(

    How can I come out from this issue?


    Many Thanks Deepak

    Thursday, August 29, 2019 7:44 AM

All replies

  • Hi Deepak,

    If you have any issue about Wix, please submit it to Wix Toolset.

    Thank you for your understanding.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 29, 2019 9:23 AM
  • In addition to changing the upgrade code and installer version number did you also make sure that the binary being installed in the upgrade has a higher version number?
    Saturday, August 31, 2019 1:24 PM