Hi!

When I installed the following test MSI, and uninstall it afterwards, the
registry key gets removed. HOWEVER, if I install a version 1.0 and a version
1.1 of the MSI (with different Versions and product codes, of course), and I
uninstall own of them, the Registry key is still there. Please note that the
Key has a $(var.ProductCode) inside, so its different from version to
version.

I introduced the Property DISABLEMSIUPGRADE to disable the
RemoveExistingProducts Action. I need to do this, because I have some custom
upgrade logic in my external UI handler. 

If I don't set DISABLEMSIUPGRADE, the problem doesn't occour. Is there
another way to disable the Upgrade using a property?

 How can I fix this probem? 

Thanks a lot.

WiX file:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <?define ProductVersion="$(var.Version)"?>
  <?define ProductCode="$(var.PCode)"?>
        <Product Id="$(var.ProductCode)" Name="UpgradeTest" Language="1033"
Version="$(var.ProductVersion)" Manufacturer="Test"
UpgradeCode="5cb959d6-9ea9-4581-aa9f-76d44ec9dab7">
                <Package InstallerVersion="301" Compressed="yes" />
    
    <Property Id="DISABLEMSIUPGRADE" Secure="yes" />
    
                <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

    <Upgrade Id="5cb959d6-9ea9-4581-aa9f-76d44ec9dab7">
      <UpgradeVersion Minimum="1.0.0" IncludeMaximum="yes" Maximum="1.2.1"
Property="OLDERVERSIONBEINGUPGRADED" />
    </Upgrade>
    
    <UIRef Id="WixUI_Minimal"/>
    
                <Directory Id="TARGETDIR" Name="SourceDir">
                        <Directory Id="ProgramFilesFolder">
                                <Directory Id="APPLICATIONFOLDER" 
Name="UpgradeTest
$(var.ProductVersion)">
                                         <Component Id="ProductComponent"
Guid="b136fee3-3bc6-47d4-967a-d0a807eb6735">
             <File Id="TestFile"
Source="TestFiles\$(var.ProductVersion)\TestFile.txt">
               <Shortcut Advertise="yes" Id="shortMain" Name="TestFile
$(var.ProductVersion)" Directory="MainAppProgramMenu"
WorkingDirectory="INSTALLLOCATION" />              
             </File>
             <RegistryKey Root="HKLM"
Key="SOFTWARE\Test\UpgradeTest\$(var.ProductCode)"
Action="createAndRemoveOnUninstall">
               <RegistryValue Name="Test" Type="string" Value="UpgradeTest
$(var.ProductVersion)" />
             </RegistryKey>
             <RemoveFolder Id="RemoveShortcut"
Directory="MainAppProgramMenu" On="uninstall"/>
                                         </Component>
                                </Directory>
                        </Directory>
      
      <Directory Id="ProgramMenuFolder" >
        <Directory Id="MainAppProgramMenu" Name="UpgradeTest">
      
        </Directory>
      </Directory>
    </Directory>

                <Feature Id="ProductFeature" Title="UpgradeTest" Level="1">
                        <ComponentRef Id="ProductComponent" />
                </Feature>

    <InstallExecuteSequence>
      <!-- RemoveExistingProducts nur ausführen, wenn es nicht von der
Kommandozeile (Setup.exe) deaktiviert wurde -->
      <RemoveExistingProducts After="InstallInitialize">NOT
DISABLEMSIUPGRADE</RemoveExistingProducts>
    </InstallExecuteSequence>
        </Product>
</Wix>

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/RegistryKey-doesn-t-get-removed-WiX-MSI-bug-tp5329658p5329658.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to