tags:

views:

535

answers:

1
A: 

From the Windows Installer MSDN topic Organizing Applications into Components:

Never create two components that install a resource under the same name and target location. If a resource must be duplicated in multiple components, change its name or target location in each component. This rule should be applied across applications, products, product versions, and companies.

Option (2) would effectively create a new component for the same registry key each time you release a new version, which violates the quoted rule.

Option (3) can be done in wix by setting the component GUID as Guid="". It will make windows installer install the component resources and then "forget" the component. This may do what you want in the sense that the installed resources will not be removed. However, it also means that a "repair" will not be able to restore the registry entries if they go missing.

Therefore you should go for option (1) where you have a fixed GUID, and set the Permanent attribute to keep the reference count for the component non-zero. How windows installer does this internally is an implementation detail that you shouldn't care about, so I don't see the point of looking for those windows installer registry settings.

Wim Coenen
Only one further questions. What does 'Name' mean in the MSDN reference you quoted? From your answer I take it that 'Name' is either the GUID or some combination of the Component and GUID fields of the Component Table entry. BTW, I prefer 1) since I can do that with one Orca transfrom without any follow up edit.
Mike D
'name' means the name of the installed resource, i.e. a file name or registry keys. 'two components' means 'two components with different GUIDs'.
Wim Coenen
Ok, I'm pretty sure I understand BUT I wouldn't have drawn that conclusion without a strong hint.
Mike D

related questions