Preventing the removal of shared registry keys

G

Guest

I am attempting to install a number of packages to a server environment.
Several packages have components that install common registry keys. All
components have different GUIDs. Other than specifying for every key to not
be removed on uninstall, how do I prevent shared registry keys from being
removed?

Do I need to create a common component GUID for each component that shares a
registry key?

If Windows Installer protects shared DLL's is there any planned feature to
protect shared registry keys?

An example of this would be attempting to install two applications that use
two different versions of MDAC - say MDAC 2.0 and MDAC 2.7. Although these
will work together, on uninstall of either application the other application
is left without key registry information. Does Microsoft have a solution for
this?

Another point of clarification I would like is, how Windows Installer goes
about deciding to write registry values. If I have two packages with two
common components, that have different GUID's, how does it decide on whether
to write the registry information? I understand that file versioning rules,
but there does not appear to be a similar concept for registry keys. Does it
just overwrite the registry key? Thanks.
 
P

Phil Wilson

Windows Installer sharing works from component Guids, so yes, a registry
item that is shared needs to have the same component Guid in all the setups.
That's where merge modules help. The most common example of registry sharing
is probably COM, and that scheme manages the registry entries based on a
shared file. The registry entries are in a component with the COM server, in
a merge module. That file and the registry entries get installed by several
apps to the same locatiojn using the same merge module. The ref counting
keeps the file there, and the file keeps the registry entries there because
they're all in the same component. Windows Installer can use the shared DLLs
count in the registry too. So yes, you can do that sharing with a merge
module that all setups use, the registry entries being key paths, but if
they're associated with a file that works too.

I don't think your MDAC example is a good one - key parts of MDAC are part
of the OS, and I'm pretty sure you can't have tw applications using MDAC in
side-by-side mode.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top