Remote DLL Registration without access to HKEY_CLASSES_ROOT
- by mohlsen
We have a legacy VB6 application that updates itself on startup by pulling down the latest files and registering the COM components. This works for both local (regsvr32) ActiveX COM Components and remote (clireg32) ActiveX COM components registered in COM+ on another machine.
New requirements are preventing us from writing to HKEY_LOACL_MACHINE (HKLM) for security reasons, which is what obviously happens by default when calling regsvr32 and clireg32.
We have come up with an way to register the local COM componet under HKEY_CURRENT_USER\Software\Classes (HKCU) using the RegOverridePredefKey Windows API method. This works by redirecting the inserts into the registry to the HKCU location. Then when the COM components are instantiated, windows first looks to HKCU before looking for component information in HKLM. This replaces what regsvr32 is doing.
The problem we are experiencing at this time is when we attempt to register VBR / TLB using clireg32, this registration process also adds registration keys to HKEY_LOACL_MACHINE.
Is there a way to redirect clireg32.exe to register component is HKEY_CURRENT_USER?
Are there any other methods that would allow us to register these COM+ components on clients machine with limited security access?
Our only solution at this time would be to manually write the registration information to the registry, but that is not ideal and would be a maint issue.