Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 48947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:21:35+00:00 2026-05-10T16:21:35+00:00

How can I make a major upgrade to an installation set (MSI) built with

  • 0

How can I make a major upgrade to an installation set (MSI) built with WiX install into the same folder as the original installation?

The installation is correctly detected as an upgrade, but the directory selection screen is still shown and with the default value (not necessarily the current installation folder).

Do I have to do manual work like saving the installation folder in a registry key upon first installing and then read this key upon upgrade? If so, is there any example?

Or is there some easier way to achieve this in MSI or WiX?

As reference, I my current WiX file is below:

<?xml version='1.0' encoding='utf-8'?> <Wix xmlns='http://schemas.microsoft.com/wix/2003/01/wi'>     <Product Id='a2298d1d-ba60-4c4d-92e3-a77413f54a53'              Name='MyCompany Integration Framework 1.0.0'              Language='1033'              Version='1.0.0'              Manufacturer='MyCompany'              UpgradeCode='9071eacc-9b5a-48e3-bb90-8064d2b2c45d'>          <!-- Package information -->         <Package Keywords='Installer'                  Id='e85e6190-1cd4-49f5-8924-9da5fcb8aee8'                  Description='Installs MyCompany Integration Framework 1.0.0'                  Comments='Installs MyCompany Integration Framework 1.0.0'                  InstallerVersion='100'                  Compressed='yes' />          <Upgrade Id='9071eacc-9b5a-48e3-bb90-8064d2b2c45d'>             <UpgradeVersion Property='PATCHFOUND'                             OnlyDetect='no'                             Minimum='0.0.1'                             IncludeMinimum='yes'                             Maximum='1.0.0'                             IncludeMaximum='yes'/>         </Upgrade>          <!-- Useless but necessary... -->         <Media Id='1' Cabinet='MyCompany.cab' EmbedCab='yes' />          <!-- Precondition: .NET 2 must be installed -->         <Condition Message='This setup requires the .NET Framework 2 or higher.'>             <![CDATA[MsiNetAssemblySupport >= '2.0.50727']]>         </Condition>          <Directory Id='TARGETDIR'                    Name='SourceDir'>             <Directory Id='MyCompany'                        Name='MyCompany'>                 <Directory Id='INSTALLDIR'                            Name='Integrat'                            LongName='MyCompany Integration Framework'>                     <Component Id='MyCompanyDllComponent'                                Guid='4f362043-03a0-472d-a84f-896522ce7d2b'                                DiskId='1'>                         <File Id='MyCompanyIntegrationDll'                               Name='IbIntegr.dll'                               src='..\Build\MyCompany.Integration.dll'                               Vital='yes'                               LongName='MyCompany.Integration.dll' />                         <File Id='MyCompanyServiceModelDll'                               Name='IbSerMod.dll'                               src='..\Build\MyCompany.ServiceModel.dll'                               Vital='yes'                               LongName='MyCompany.ServiceModel.dll' />                     </Component>                      <!-- More components -->                 </Directory>             </Directory>         </Directory>          <Feature Id='MyCompanyProductFeature'                  Title='MyCompany Integration Framework'                  Description='The complete package'                  Display='expand'                  Level='1'                  InstallDefault='local'                  ConfigurableDirectory='INSTALLDIR'>             <ComponentRef Id='MyCompanyDllComponent' />         </Feature>          <!-- Task scheduler application. It has to be used as a property -->         <Property Id='finaltaskexe'                   Value='MyCompany.Integration.Host.exe' />         <Property Id='WIXUI_INSTALLDIR'                   Value='INSTALLDIR' />          <InstallExecuteSequence>             <!-- command must be executed: MyCompany.Integration.Host.exe /INITIALCONFIG parameters.xml -->             <Custom Action='PropertyAssign'                     After='InstallFinalize'>NOT Installed AND NOT PATCHFOUND</Custom>             <Custom Action='LaunchFile'                     After='InstallFinalize'>NOT Installed AND NOT PATCHFOUND</Custom>              <RemoveExistingProducts Before='CostInitialize' />         </InstallExecuteSequence>          <!-- execute comand -->         <CustomAction Id='PropertyAssign'                       Property='PathProperty'             Value='[INSTALLDIR][finaltaskexe]' />         <CustomAction Id='LaunchFile'                       Property='PathProperty'                       ExeCommand='/INITIALCONFIG '[INSTALLDIR]parameters.xml''                       Return='asyncNoWait' />          <!-- User interface information -->         <UIRef Id='WixUI_InstallDir' />         <UIRef Id='WixUI_ErrorProgressText' />     </Product> </Wix> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:21:36+00:00Added an answer on May 10, 2026 at 4:21 pm

    There’s an example in the WiX tutorial: https://www.firegiant.com/wix/tutorial/getting-started/where-to-install/

    <Property Id='INSTALLDIR'>   <RegistrySearch Id='AcmeFoobarRegistry' Type='raw'     Root='HKLM' Key='Software\Acme\Foobar 1.0' Name='InstallDir' /> </Property> 

    Of course, you’ve got to set the registry key as part of the install too. Stick this inside a component that’s part of the original install:

    <RegistryKey          Key='Software\Software\Acme\Foobar 1.0'          Root='HKLM'>   <RegistryValue Id='FoobarRegInstallDir'              Type='string'              Name='InstallDir'              Value='[INSTALLDIR]' /> </RegistryKey>  
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have several applications that use Apache HTTPClient 3 to make HTTP requests. Recently
My brother-in-law is a freshman engineering major in college. He has no prior programming
Sorry about the length of this question. I'm new to Java and I've come
I routinely graph time series data in Excel, and I find the default Excel
I'm working on a simple one-page calculator, heavy with JavaScript and form elements. Here
We have a huge ASP.NET web application which needs to be deployed to LIVE
I need to open a specific SSL secured site inside an iFrame of an
I've got an AIR app that is loading mx:HTML s. I would like to
Our DBA came to us with information that our LINQ queries are creating many
I am writing a C program that is expected to be compiled with all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.