开发者

Cannot get certain COMs to register using Visual Studio Deployment

开发者 https://www.devze.com 2023-04-06 05:51 出处:网络
I\'m deploying an MSI that includes several C++ COMs.We\'re adapting it to work on Windows 7/Server 2008, and for some reason self registering the COMs no longer works.As a result, I\'ve changed them

I'm deploying an MSI that includes several C++ COMs. We're adapting it to work on Windows 7/Server 2008, and for some reason self registering the COMs no longer works. As a result, I've changed them all to be COMRelativePath.

This seemed to have worked, but 3 of the components are, mysteriously, not registering. During the build of the installer I see this message for those that are not registering:

WARNING: Unable to create registration information for file named 'ComponentThatWontRegister.dll'

Having done extensive research and tried every work-around, I cannot get past this. I've tried setting both RegCap.exe and devenv to run in various compatibility modes and elevated to administrative privelages. I've tried Visual Studio 2010, same issue.

The odd thing is that most of the COMs register just fine and they are ALL set the same way; it's only a very few that are having this issue. I've gone through the COMs item by item and I can't find anything that would make one fail and another succeed. Also, on the same system if I register the com using regsvr32 it works so long开发者_Go百科 as I run the command prompt as administrator.


This indicates that the error can occur if two or more components in the msi have the same progid. Could this be the cause?


If these are ATL controls, some may link with ATL.DLL, some not. Depending on the deployment target versus build machine, you may get an ATL.DLL that is UAC aware whilst the static regsitrar using ones are not, when compiled against an older platform SDK.

Compare the linker options of the components that fail to the ones that succeed.

0

精彩评论

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

关注公众号