cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JPRaven
Level 3

Can't Set Registry Flags to Install Only

In a simple MSI project I have created some Registry Keys and values.
When I right-click on the registry keys in the Registry View, the 'Install Only' flag which I want to set is greyed out. Why is this and how can I set the flag?

Thanks 🙂
Labels (1)
0 Kudos
5 Replies
DebbieL
Level 17

That option applies only to keys that do not contain subkeys or values. Do the keys that you are right-clicking have any subkeys or values?

For more information, see:
Registry Flags
Registry Table
0 Kudos
DataAnalyzer
Level 7

The reason I want to preserve the registry is that certain values the person enters with one products should remain for other products even if they uninstall the first one.

We thought we'd be able to accomplish that by putting it in a registry key that would only be overwritten but never deleted when uninstalled.

Is there a way to do that with InstallShield?
0 Kudos
DebbieL
Level 17

Depending on what you are trying to do, here are various ways to approach this requirement.

  • Mark the components that contain the registry data as permanent. (In the Components view, change the Permanent setting to Yes.)
  • Create a Suite/Advanced UI project to build an installation that can install all of the products. The shared registry options would be included in a single, hidden .msi package that would be configured to not be uninstalled.
  • Have the application itself handle the registry changes. Thus, when the application is uninstalled, the registry entries would not be removed. (If these keys are per-user configuration items, they wouldn't play well with MSI anyway. Thus, having the application make the registry changes may be preferrable.)
0 Kudos
DataAnalyzer
Level 7

The first suggestion to make the Component permanent is exactly what I was looking for. Excellent!

Is there a way to make a component independent of the setup so that multiple products can use the same component? The products aren't in a single suite, so that's not an option. Thanks!
0 Kudos
DebbieL
Level 17

You would need to use the same component GUID across different installations. You'd also want to pay special attention to Windows Installer component rules, and make sure that you do not break any. You'd also want to carefully test various uninstall and upgrade scenarios for different products that use the same registry entries, and make sure that the behavior works as you expect.

To learn more, see Organizing Applications into Components (as well as the other help topics that are linked to on this page).
0 Kudos