Kendall Frey
Kendall Frey

Reputation: 44316

Visual Studio Installer - Registry keys being overwritten by COM

In my Visual Studio installer project, I have a dll set to register with COM. I also want to modify a key that is part of the COM registry (The InprocServer32 key). But if I make an entry into the Registry Settings in Visual Studio, the entry gets overwritten by the COM registration.

I used to use a MSI transform to add a registry key to the end of the registry table, where it would overwrite the COM one. However, this was very error-prone, so I decided to switch to the Registry settings in Visual Studio.

How can I make a Registry entry that will overwrite an entry made by the automatic COM registration (i.e. later in the registry table)?

Upvotes: 0

Views: 631

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55581

You can't with visual studio projects. This is one of the many limitations of that tool that has caused Microsoft to kill it in the next release of Visual Studio. They reccomended going to InstallShield Limited Edition instead.

If you are going to stick with VDPROJ then the post build processing ( which could include perm. applying the transform to the MSI or using SQL commands to update the table ) would be the way to go. Another approach would be to factor the component out into a WiX merge module that is consumed by VDPROJ. This would give you better control over the component authoring.

Redemption of Visual Studio Deployment Projects

Upvotes: 1

Related Questions