register assembly at runtime without administrative privileges

X

xyz

Hi,

I have a desktop application wherein i am using
RegistrationServices.RegisterAssembly to register a .net dll to the Registry.
This works fine for a user with admin privileges, but when a user without
admin privileges tries to run the application, the following error comes up.

System.UnauthorizedAccessException: Access to the registry key
'HKEY_CLASSES_ROOT\Record is denied.

Is there any solution for this?
 
P

Phill W.

xyz said:
I have a desktop application wherein i am using
RegistrationServices.RegisterAssembly to register a .net dll to the Registry.

That's fine; right up to the point you try to register the dll.
This works fine for a user with admin privileges, but when a user without
admin privileges tries to run the application, the following error comes up.

System.UnauthorizedAccessException: Access to the registry key
'HKEY_CLASSES_ROOT\Record is denied.

Is there any solution for this?

Use an /installer/ to both install your application and register the
component in the Registry. Your application then uses the component
/without/ registering it for itself which, as you've discovered, you
cannot do.

Of course, the installer has to be run by a user with Administrator
privileges. ;-)

HTH,
Phill W.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top