[wix-users] How can I change install path at upgrade time.

Brian Calhoun calhounbmb at gmail.com
Thu Jan 5 14:50:36 PST 2017


All,

I am using WiX to create an MSI install.  Lets say that I have version
1.2.3 installed and I am upgrading to version 2.0.0.  I want version 1.2.3
removed and version 2.0.0 installed at a new path.  My current path related
elements appear as follows:

Version 1.2.3

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.PlatformProgramFilesFolder)">
        <Directory Id="OrgFolder" Name="Sample">
          <Directory Id="SolutionFolder" Name="CommonProducts">
            <Directory Id="INSTALLFOLDER" Name="SampleComponent" />
          </Directory>
        </Directory>
      </Directory>
    </Directory>
  </Fragment>

Version 2.0.0

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="$(var.PlatformProgramFilesFolder)">
        <Directory Id="OrgFolder" Name="Sample">
          <Directory Id="SolutionFolder" Name="CommonProducts">
            <Directory Id="INSTALLFOLDER" Name="UpdatedSampleComponent" />
          </Directory>
        </Directory>
      </Directory>
    </Directory>
  </Fragment>


I expect that the files at C:\Program
Files\Sample\CommonProducts\SampleComponent would be removed and new files
placed at C:\Program Files\Sample\CommonProducts\UpdatedSampleComponent but
it always seems to use C:\Program
Files\Sample\CommonProducts\SampleComponent.

What am I missing?

Thanks for any help you can provide.


More information about the wix-users mailing list