开发者

How can A COM component be registered halfway?

I'm building an an installer using a Visual Studio 2008 deployment (setup) project. The project has a Launch Condition "Privileged" so that only administrators can run it. It uses a merge module provided by a third party to register a COM component. The COM component is exposed via a .NET interop DLL, which is in turn used by the program for which I am building the installer. (Specifics: this is an Intuit merge module which installs the QBFC framework).

After the install completes, the COM component can not be loaded. The error is "class not registered". But when I go to the registry, I can see that all of the correct entries are there under HKEY_CLASSES_ROOT\CLSID\{the class id} - where the class id matches the class id of the error message. If I then open a command prompt in administrative mode and re-register the DLL the COM server using Regsvr32, everything is fixed, but I can't see any change to KEY_CLASSES_ROOT\CLSID

When I examine the system using process monitor while it is getting the class not registered error, I can see that the application is getting a "name not found" error when it tries to open the CLSID, even though the CLSID is definitely there (I have double and triple checked). I'm thinking this must have something to do with permissions. An alternate theory is that perhaps the "class not registered" message is coming from a dependent component, but this wouldn't explain what I'm seeing in process monitor.

All of these test results come fr开发者_StackOverflow中文版om a Windows 7 Ultimate 32 bit operating system.

What steps would you take to get to the bottom of this problem?


One thing that it might be is an issue with the component category cache. It's a long shot, but if you add a step to your install to delete the keys under HKEY_CLASSES_ROOT\Component Categories\ does it help? If so, you need to figure out which comcat cache you need to delete (i.e. which one your objects are using).

The other thing you can do is export the entire registry, do your install, export the registery, do the regsvr32 thing, export the registry. Then windiff each revision of the exported registry file. That may give you an idea of what changed, at least.

Lastly, make sure you're doing 64bit registration correctly if it's a 64bit machine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜