Using a .msi package, I want to create a few registry keys if they don't exist, leave them alone if they do exist, and not delete them if the program is removed. I have done this (using Orca) by adding entries to the following msi tables: Components, FeatureComponents, Registry, & LockPermissions. My question is what should I do about the GUID used in the ComponentID of the Component table for these keys? It seems there are 3 choices.
1) Assign them once and leave them alone in future versions of the msi
2) Assign new ones every time a new version is produced
3) Use NULL (per http://msdn.microsoft.com/en-us/library/aa368007(VS.85).aspx) I have not tried this.
Is one of these to be preferred over the other? Are there any consequences of one over the other? (I'd prefer leaving as little stuff behind as possible if the program is removed).
I am also curious to know what the following comment about the permanent attribute bit (16) means.
If this bit is set, the installer does not remove the component during an uninstall. The installer registers an extra system client for the component in the Windows Installer registry settings.
Where might might these entries be found?