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

  • Home
  • SEARCH
  • 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 162177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:20:40+00:00 2026-05-11T11:20:40+00:00

I want to assert that a certain registry value exists after installation, so I

  • 0

I want to assert that a certain registry value exists after installation, so I added the following component:

<Component Id='RegistryEntryContextMenuOdt' Guid='4BA5BA24-4F65-4BDF-99EB-CB4B947F31A9' DiskId='1' KeyPath='yes'>     <RegistryKey Id='RegKeyOdt' Root='HKCR' Action='create' Key='.odt'>       <RegistryValue Type='string' Value='openDocument.WriterDocument.1' />     </RegistryKey> </Component> 

The key/value might already be set before the installation. However, I want that the value is set to my specific value, i.e. that it will be overwritten with my value.

My problem is now that this value is always removed when my product is uninstalled. However, I only want the value to be removed if it was added by my installer. If my installer just modified the value, the previous value should be restored (or, if this is not possible, my value should remain untouched).

Please note that the key itself is not removed on uninstall. This seems to work correctly because I specified Action='create' on the RegistryKey element.

Is there maybe a similar setting for RegistryValue which will create the value but not remove it on install?

UPDATE: Both registry keys under HKCR are machine wide settinge, i.e. they originate from the HKLM\SOFTWARE\Classes branch of the registry.

  • 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-11T11:20:41+00:00Added an answer on May 11, 2026 at 11:20 am

    You can make sure that your component is only installed when the registry entry does not exist by making use of the NeverOverwrite attribute of the Component element. From the wix documentation for NeverOverwrite:

    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.

    You may also need to set the KeyPath attribute on the Registry element to yes to make it unambiguous that the registry entry is the component key path.

    If you do want to set the registry value even if it already exists, but you don’t want to remove it on uninstall, then you can use the Permanent attribute of the Component element instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You don't have to. It is built in to the… May 11, 2026 at 7:43 pm
  • Editorial Team
    Editorial Team added an answer Short answer: Yes. I'm a fan of using what's in… May 11, 2026 at 7:43 pm
  • Editorial Team
    Editorial Team added an answer Ensure that you have changed the first tag in the… May 11, 2026 at 7:43 pm

Related Questions

Can I use String.Format() to pad a certain string with arbitrary characters? Console.WriteLine(->{0,18}<-, hello);
Delphi 2009 uses build configurations . When you create a new project you have
I want to assert that a method is called exactly one time. I'm using
I want to write a lambda expression to verify that a list is ordered

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.