CComModule UnregisterServer error?

I have a CComModule that is calling RegisterServer (TRUE) on DllRegisterServer and UnregisterServer (TRUE) on DllUnregisterServer. The UnregisterServer is getting a 0x8002801C (Error accessing the OLE registry.) error and leaving around registery keys. I am using a Windows Server 2k8 R2 machine with UAC enabled. The components are x86 and I am using the 32 bit regsrv32.

Does anyone know why I would be getting this error?


You must run Regsvr32.exe from a command prompt that's elevated to administrator (i.e. UAC disabled). Make a shortcut on your desktop to "cmd.exe", right-click it and choose "Run as Administrator".

If you're using ATL and VS2008 then you can register your COM object per-user which writes the necessary registry keys to HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE. You register your object by passing a special user switch to regsvr32, e.g.:

regsvr32.exe /i:user /n yourobject.dll 

COM servers can be registered with the /RegServerPerUser switch.

I asked a similar question.

Need Your Help

Dynamic sql cursor

sql sql-server sql-server-2008 tsql dynamic-sql

I am getting "Incorrect syntax near '.' " when i run the following query.

Get Domain from IP

c# dns hostname

I am just playing around with some web crawling, and I just have a question regarding getting host names, I am coming from this question regarding getting host names. I'll use an example to ask my

How do I remove this JPanel from my JFrame?

java swing

I will simplify this to what is in my program that is actually relevant to the question.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.