How can I create a COM object for register as limited user?

0

I am creating a project in vs2010, it is intended to be installed per-user but I need to include a COM object (in a dll, I'm using ATL). The thing is I can only make the DLL register with admin privileges, but my installer doesn't require admin privileges and the com registration fails.

This is what I found: http://blogs.msdn.com/b/jaredpar/archive/2005/05/29/423000.aspx

I did that modifications, changed the .rgs files from HKCR to HKCU, and modified the DllRegisterServer code to override HKCR by HKCU\Software\Classes

But I'm getting the same error: 0x8002801c using regsvr32 (as limited user), and the installer also gives me an error. Is there something else needed to create per-user COM objects?

Thans.

com
atl
asked on Stack Overflow Jan 31, 2011 by Cesar

2 Answers

0

Create manifest file that references DLL. Check out this tool for painless manifest generation

answered on Stack Overflow Feb 23, 2011 by Goran Peroš
0

In Visual Studio 2017, you can enable Per-user Redirection option in the project properties > Linker > General.

I didn't need to change modify the rgs file.

To register COM .exe, use /RegServerPerUser flag. The normal /RegServer flag doesn't work for me (link).

To register COM .dll, use regsvr32 /n /i:user "xxxx.dll" (link).

answered on Stack Overflow Dec 14, 2017 by pogosama • edited Dec 14, 2017 by pogosama

User contributions licensed under CC BY-SA 3.0