Creating an install log is you best option to debug this. Are you sure
the UpgradeCode is the same between both versions? There is a sample
upgrade script here
http://neilsleightholm.blogspot.com/2009/01/wix-script-for-major-upgrade
s.html that might help.

 

Neil

 

From: Kshama Bafna (Persistent Systems Private Ltd)
[mailto:[email protected]] 
Sent: 24 May 2010 11:49
To: [email protected]
Subject: [WiX-devs] WIX Major Upgrade Issue

 

Hi,

 

I am new as a WIX developer. I am facing issue related to major upgrade
in WIX. As per my understanding, major Upgrade in WIX uninstalls the
previous versions and installs the newer version.

 

In my case, the newer version is installed by WIX but the older version
is not uninstalled. I have added file1.txt in version 1.0.0 of my WiX
installer. In the 2nd version (1.0.1), I have removed file1.txt and
added file2.txt. When I install version 1.0.0, the file1.txt gets copied
at the correct location. Now, when I install version 1.0.1, the
file2.txt gets copied at the desired location but  the file1.txt is not
removed. I was expecting the file1.txt to get removed automatically when
I installed the 2nd version (1.0.1). The WIX files for both the versions
has the same upgrade code.

 

I am sure that the older version is not getting uninstalled is due to
the fact that I can see multiple version of the same installable in my
Add / Remove Programs. 

 

The WIX file is as below.

 

<?xml version="1.0" encoding="UTF-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>

      

    <Product Id="*"

         UpgradeCode="393525F5-2296-4e42-A32C-07AA4E548863"

         Name="WixProject_Upgrade"

         Language="1033"

         Version="1.0.3"

         Manufacturer="Wix">

 

    <Package InstallerVersion="200" Compressed="yes" />

 

      <Upgrade Id="A2BFC8A4-63BE-42b3-A868-24D16D5520F8">

        <UpgradeVersion Minimum="1.0.0"

                        Maximum="1.0.3"

                        IncludeMinimum="yes"

                        IncludeMaximum="no"

                        Property="UPGRADEFOUND"

                        OnlyDetect="no"

                        IgnoreRemoveFailure="no"

                        />

      </Upgrade>

 

 

      <InstallExecuteSequence>

        <RemoveExistingProducts After="InstallValidate"/>

      </InstallExecuteSequence>

 

    <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

 

            <Directory Id="TARGETDIR" Name="SourceDir">

                  <Directory Id="ProgramFilesFolder">

                        <Directory Id="INSTALLLOCATION"
Name="WixProject_Upgrade">          

          <Component Id='file2'
Guid='BD7E9E5F-52D5-4c84-9961-D5F31490971B'>

            <File Id='file2' Name='file2'  Source='file2.txt' />

          </Component>

        </Directory>

                  </Directory>

            </Directory>

 

            <Feature Id="ProductFeature2" Title="WixProject_Upgrade2"
Level="1">

      <ComponentRef Id="file2"/>

    </Feature>

  </Product>

  </Wix>

 

Please let me know if I am missing anything here.

 

Thanks and Regards,

Kshama

 

------------------------------------------------------------------------------

_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to