views:

367

answers:

1

Hi

I try to register dll (ActiveX) for non-admin user using MSI. To create registry settings I have register the dll in admin mode, then exported the relevant registry entries and renamed all HKLM to HKCU.

When I install it for non-admin user all works fine. But when I use the same settings with admin user, there is a problem of discovering TypeLib.

What should be changed in the registry entries to work both for admin and non-admin user, when the registration done under HKCU?

Thank you

A: 

If your entries are really registered under HKCU, it will work. What MSI installer are you using? There should be a way to specify that it should install in user mode.

Are you letting the dll self-register or having the msi register the dll? it is best practice to have the MSI do it, but it's more of a pain. If you're having the .dll self-register you need to make sure that the dll registers in HKEY_CURRENT_USER and not HKEY_LOCAL_MACHINE, which ATL does by default.

If you built it in VS2008 with ATL, you'll want to add: AtlSetPerUserRegistration(true); to your DllRegisterServer and DllUnregisterServer.

Anyway, those are some things to look for. You can use Process Monitor and watch the Reg commands to see exactly what is happening; something somewhere is writing to HKLM.

Taxilian
Thank you,I used MSI installation but there were a problem with importing the registry.
Zaky
Does that mean you found the issue? If so, could you post what it was as an answer? If not, if you can answer some of the questions that I ask in my answer, I might be able to provide some more insight.
Taxilian