Groups | Blog | Home
all groups > dotnet interop > march 2008 >

dotnet interop : Register an assmbly in the user part of registry



PLS
3/19/2008 7:56:06 PM
regasm work fine to register an assembly for COM if you have write
permission to HKLM. This usually requires Administrator privileges.

I would like to deploy a couple of assemblies to users that do not have
Administrator privileges. I would like them to be registered under
HKCU/Software/Classes rather than under HKLM\Software\Classes.

Is there a tool available that will do this? Regasm will not.

Phil Wilson
3/21/2008 1:10:12 PM
An MSI setup will do this when you install it for the current user (just me
in a Visual Studio setup) assuming that you do the registration in the
recommended way, which is to have the registration entries in the MSI file
rather than created by code at install time. If you were to use a Visual
Studio Setup&Deployment project, you'd do this by having the vsdraCOM value
in the Register property for the assembly. This captures the registry data
and basically writes it to HKCU on a per-user install and HKLM on a
per-system install.

Alternatively, it's not all that difficult to know what registry entries are
required, although it's tedious if there are a lot. Your class registration
in the registry should be pretty obvious if you look in HKCR, so you just
need to export that and base it on HKCU instead. But that's not a tool,
sorry,
--
Phil Wilson
[MVP Windows Installer]

[quoted text, click to view]

AddThis Social Bookmark Button