tags:

views:

20

answers:

1

My MSI installer will NOT register DLL on XP. On Vista it won't register unless I am an administrator. and on Win7 it will RANDOMLY register the DLL or not.

After the MSI won't register the DLL, Users are forced to go to the install folder, type "regsvr32 mydllname.dll" - and then everything works (which proves the DLL is healthy and fine).

The "register" property for this file is "selfReg" in the MSI project. "COM" doesn't work too.

I am beginning to think either I am hallucinating or MSI simply cannot register DLLs.... very, very VERY frustrated. already a WEEK into trying to resolve this and NADA. I really hate MS at this point.

Please, help.

+2  A: 

What most probably is happening, is that your registration code is writing to the wrong registry root. For example, HKCR is a merged view of HKLM\Classes and HKCU\Classes, and the registration to HKCR in some cases will end up in the HKCU\Classes, and sometimes in HKCU\Classes\VirtualStore depending on which OS and what account the installer was run under.

In addition, if you are depending on the DllRegisterServer to register your COM dll from the MSI, the MSI engine doesn't even know about your registry entries and it's up to the actual DLL code.

What I would suggest is to change your MSI to not use the auto-registration using DllRegisterServer and not do the registration under HKCR. Instead, add your registration as explicit registry entries under HKLM\Classes (unless you have specific reasons to require per-user COM registration, which is a whole different topic).

Franci Penov

related questions