Avi

Registry issues

Hi Guys,

I would like to know how can I add a registry entry (if it does not exist) and do not delete it when uninstalling.

I need this for defining our license directory with a default value but I do not want to delete it or overwrite it when uninstalling/upgrading our product - the user may change this value.

I saw the options in the properties of the registry keys, but it seems to be irrelevant and ignored by the msi. I also need this to be on registry entry and not just on registry key.

Please let me know if there is any way I can do this with the current released version (2.1.1)

Thanks in Advance,
Avi
Avi

I tried to use the Organization options

I tried to use the Organization options,

I can define a registry value to be Permanent and it will not be uninstalled. But if the value was changed it will be rewrite to the default when installing again.

I also tried the "Never Overwrite" option but then the setup did not run and ended immediately with an error: "Could not open key: UNKNOWN\Software\... Verify that you have sufficient access to that key, or contact your support personal." :?

Is there anything else I should try?

Avi
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Hi Avi,

You should not install that registry value, but instead create it from your program. This way, it will not be deleted at uninstall, as the installed doesn't know about it at all.

Regards,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Avi

Create with my program???

Create with my program???

I know that I create it with my program, actually I create a program that will install itself :?

This feature is very basic for install programs, all I am asking is to have the ability to:
1. Choose if removing or not at uninstall.
2. Choose if overwriting when installing.

Exactly as you have in the environment variables.

Avi
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Avi,

Sorry, but I am afraid Windows Installer just doesn't support those semantics for registry values.

An installed value will be uninstalled, even if it changed or not, unless the component was marked permanent.

The recommended solution in your case would be Custom Actions - but that's equivalent to creating the value inside your program...

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Avi

This is ok with me - when marking the component as permanent it stays on the system,

But, do you know why do I get the error when I am marking the component as "Never overwrite"? (You can see the exact error up in this thread)

I also added a "NOT Installed" condition to the component but it did not helped.

Is it complicated to add a custom action? If not can you guide me?

Thanks in advance,
Avi
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

A registry value marked as "Never overwrite" must be placed in a defined hive root (like HKEY_LOCAL_MACHINE). The "Current User/Local Machine" root is virtual. Please verify the hive root of your registry values.

Custom Actions are just regular EXE or DLL files. One generally write them in C or C++ for no depends. The Windows Installer functionality can be accessed through an API documented in the SDK.

Best regards,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Avi

It is working

Hi Cata,

This is working very nicely!
Cata wrote:A registry value marked as "Never overwrite" must be placed in a defined hive root (like HKEY_LOCAL_MACHINE). The "Current User/Local Machine" root is virtual. Please verify the hive root of your registry values.
Thanks, this is a good solution.

Avi

Return to “Feature Requests”