COM Interop without regasm

Viewed 9139

I'm a limited user, and I need to write an Outlook macro that exposes a C# library in Outlook 2003 and 2007.

I do not have any admin privilges at all, not even at install time, so I can't run RegAsm and I can't (I assume) write a managed add-in.

Is there any way to call .Net code from VBA in this scenario, or are there any other solutions?

This is for personal use only, so an ugly hack is perfectly acceptable (so long as it works)

5 Answers

Registering a COM object (ex. ActiveX control) and making it visible to all users in the system requires administrative rights.

BUT, if visibility to all users is not needed (or not possible due to limited user restriction) then the COM object can be registered only for the particular user.

This generally done by registering the object in HKCU instead of HKLM. This will apply for "regular" COM objects and the ones exposed through .NET COM Interop.

Other more fine grained approaches also exits, the already mentioned RegFree COM which addresses a particular executable.

So, given all of the above the solution to capture all info into reg file and replace HKLM with HKCU shall work (not nice, but so are the tools).

Related