WiX Installer wrong about newer version already installed

后端 未结 2 477
天涯浪人
天涯浪人 2021-01-23 13:12

I have used WiX Install tools in Visual Studio to create create an installer for my C# Windows Forms application.

The Installer works when invoked independently (command

相关标签:
2条回答
  • 2021-01-23 13:44

    From Log: What product does this product code from the log file belong to?

    Property(S): WIX_DOWNGRADE_DETECTED = {8BC4D6BF-C0CF-48EB-A229-FC692208DFF0}

    Product Code & Product Name: Maybe try to run this script to figure out what product that really is: 1) copy & paste the script below into notepad, 2) save as ANSI file: "Product Code Lookup.vbs" on desktop, 3) double click script file to run:

    On Error Resume Next ' we ignore all errors
    Set installer = CreateObject("WindowsInstaller.Installer")
    search = Trim(InputBox("Please paste or type in the product code you want to look up details for:", _
                  "Find Product Details (test GUID provided):", "{8BC4D6BF-C0CF-48EB-A229-FC692208DFF0}"))
    If search = vbCancel Or Trim(search) = "" Then
       WScript.Quit(0)
    End If
    
    For Each product In installer.ProductsEx("", "", 7)
       If (product.ProductCode = search) Then
          MsgBox "Product Code: " & product.ProductCode & vbNewLine & _
                 "Product Name: " & product.InstallProperty("ProductName") & vbNewLine & _
                 "Product Version: " & product.InstallProperty("VersionString"), vbOKOnly, "Match Found:"
          Exit For
       End If
    Next
    
    MsgBox "Completed product scan.", vbOKOnly, "Scan Complete"
    

    Full List: If you want a text file with all products listed, please check the VBScript here (towards bottom).

    AllowSameVersionUpgrades: Just answered another major upgrade question. Maybe skim it too: WIX does not uninstall older version. Remember that only the first 3 digits of the ProductVersion affect major upgrades. I am also not too keen on the "AllowSameVersionUpgrades" approach, I prefer the plain and simple major upgrade variant - like this (just my 2 cents, business requirements are always hard):

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    

    Upgrade Table: It would help to see the actual upgrade table. Is there anything funky in there? Multiple entries? Maybe you have re-used the same upgrade code for separate products? Upgrade code should remain the same for a product line or family of products that share upgrade handing. It should not be the same for different products that you want to upgrade separately. Generally speaking.


    Links:

    • Determine msiexec exit code when msi file already installed
    0 讨论(0)
  • 2021-01-23 13:50

    Is it deployed as an Application or Package in SCCM? If it is an application, what's the detection method? If it is using the same product code as the detection method, it may think that it has already been installed on the machine.

    Best Regards, Ray

    0 讨论(0)
提交回复
热议问题