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 779969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:00:24+00:00 2026-05-14T20:00:24+00:00

We have a product installer created with Wix, containing a program package ( V1

  • 0

We have a product installer created with Wix, containing a program package (“V1“) and some configuration files. Now, we are going to make a major upgrade with a new product code, where the old version of the product is uninstalled and “V2” is installed. What we want is to save one of the configuration files from uninstalling, since it is needed for the V2, too. Unfortunately, we forgot to set the Permanent="yes" option when we delivered V1 (read this question for more information).

Here comes the question: is there an easy way of preventing the uninstall of the file anyhow? Of course, we could add a custom action to the script to backup the file before uninstallation, and another custom action to restore it afterwards, but IMHO that seems to be overkill for this task, and might interfere with other parts of the MSI registration process.

EDIT: And yes, the NeverOverwrite="yes" attribute is already set in V2, and the behaviour is as I described it.

I don’t think it will help to change something directly in the component parameters of V2. Perhaps there’s a chance to modify the registry somehow in a custom action before uninstalling V1 so the installer service thinks the configuration file in V1 was installed with Permanent="yes"?

  • 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. Editorial Team
    Editorial Team
    2026-05-14T20:00:24+00:00Added an answer on May 14, 2026 at 8:00 pm

    Try the NeverOverwrite attribute for the configuration file

    If this attribute is set to ‘yes’, the
    installer does not install or
    reinstall the component if a key path
    file or a key path registry entry for
    the component already exists.

    EDIT

    I have just tested this in a test setup. At first it didn’t work because I had scheduled the RemoveExistingProducts action before InstallInitialize sequence. This removes the old product before the new product is installed so it can’t compare.

    However when I set it to after InstallFinalize it did work, it left the file there even though the original setup didn’t have NeverOverwrite set. here are my two test examples

    version 1.0.0.0

    <?xml version="1.0" encoding="utf-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
        <Product Id="35d07bf8-a729-402d-83d6-fdc55799a3d5" Language="1033" Manufacturer="..." Name="test1" UpgradeCode="9773a278-068d-4fac-8241-4a5b7e54f15a" Version="1.0.0.0">
            <Package Compressed="no" InstallerVersion="200" />
            <Property Id="ALLUSERS" Value="1" />
            <Upgrade Id="9773a278-068d-4fac-8241-4a5b7e54f15a">
                <UpgradeVersion OnlyDetect="no" Property="REMOVEOLDVERSION" Maximum="1.0.0.0" IncludeMaximum="no" />
                <UpgradeVersion OnlyDetect="yes" Property="NEWERFOUND" Minimum="1.0.0.0" IncludeMinimum="no" />
            </Upgrade>
            <Directory Id="TARGETDIR" Name="SourceDir">
                <Directory Id="ProgramFilesFolder" Name="ProgramFilesFolder">
                    <Directory Id="INSTALLDIR" Name="test1">
                        <Component Id="New_Text_Document.txt" Guid="{CCA38D83-A890-4528-B11D-DA2E2DCDED93}" Feature="ProductFeature">
                            <File Id="New_Text_Document.txt" KeyPath="yes" Source="Harvest\ProgramFilesFolder\INSTALLDIR\New Text Document.txt" />
                        </Component>
                    </Directory>
                </Directory>
            </Directory>
            <Feature Id="ProductFeature" Level="1" Title="CompletePackage" Description="The complete Product." Display="expand" />
            <CustomAction Id="NewerFound" Error="A later version of [ProductName] is already installed" />
            <InstallExecuteSequence>
                <Custom Action="NewerFound" After="FindRelatedProducts">NEWERFOUND</Custom>
                <RemoveExistingProducts After="InstallFinalize" />
            </InstallExecuteSequence>
            <UIRef Id="WixUI_Minimal" />
            <Media Id="1" />
            <UI />
        </Product>
    </Wix>
    

    version 1.0.1.0

    <?xml version="1.0" encoding="utf-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
        <Product Id="1da36626-d760-4c4c-8a5c-3eb3841dbfd5" Language="1033" Manufacturer="..." Name="test1" UpgradeCode="9773a278-068d-4fac-8241-4a5b7e54f15a" Version="1.0.1.0">
            <Package Compressed="no" InstallerVersion="200" />
            <Property Id="ALLUSERS" Value="1" />
            <Upgrade Id="9773a278-068d-4fac-8241-4a5b7e54f15a">
                <UpgradeVersion OnlyDetect="no" Property="REMOVEOLDVERSION" Maximum="1.0.1.0" IncludeMaximum="no" />
                <UpgradeVersion OnlyDetect="yes" Property="NEWERFOUND" Minimum="1.0.1.0" IncludeMinimum="no" />
            </Upgrade>
            <Directory Id="TARGETDIR" Name="SourceDir">
                <Directory Id="ProgramFilesFolder" Name="ProgramFilesFolder">
                    <Directory Id="INSTALLDIR" Name="test1">
                        <Component Id="New_Text_Document.txt" Guid="{CCA38D83-A890-4528-B11D-DA2E2DCDED93}" Feature="ProductFeature" NeverOverwrite="yes">
                            <File Id="New_Text_Document.txt" KeyPath="yes" Source="Harvest\ProgramFilesFolder\INSTALLDIR\New Text Document.txt" />
                        </Component>
                    </Directory>
                </Directory>
            </Directory>
            <Feature Id="ProductFeature" Level="1" Title="CompletePackage" Description="The complete Product." Display="expand" />
            <CustomAction Id="NewerFound" Error="A later version of [ProductName] is already installed" />
            <InstallExecuteSequence>
                <Custom Action="NewerFound" After="FindRelatedProducts">
    NEWERFOUND</Custom>
                <RemoveExistingProducts After="InstallFinalize" />
            </InstallExecuteSequence>
            <UIRef Id="WixUI_Minimal" />
            <Media Id="1" />
            <UI />
        </Product>
    </Wix>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 386k
  • Answers 386k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's the resources required to set up an operation. It… May 14, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer If you need description, you have to include it in… May 14, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer When you have a single out parameter, it can often… May 14, 2026 at 11:41 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.