Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run RegAsm without being Administrator?

Tags:

com

My coworker is trying to register some COM components (which I wrote) via RegAsm.exe and it says he needs Administrator privileges. His account has admin privileges but he is not logged in as Administrator. Is there a way to use his regular user account and succeed at this task?

like image 788
patrick Avatar asked Oct 21 '10 20:10

patrick


2 Answers

Admin privileges are required to allow Regasm.exe to update the registry. If this is a UAC restriction then create a shortcut on the desktop for cmd.exe and check the "Run this program as an administrator" checkbox. Or change this setting on the Visual Studio Command Prompt shortcut, that's easier.

like image 116
Hans Passant Avatar answered Oct 23 '22 17:10

Hans Passant


Check this out: https://gist.github.com/florentbr/6be960752fc852ee99eece6b4acb8ba7 I was trying to do the same thing and was about to give up when I came upon it.

It's a cmd script that will register the SeleniumBasic.dll in the registry without having admin privileges. With a bit of work you should be able to repurpose the code to register your COM components.

Many, many thanks to Florent Breheret for SeleniumBasic and this cmd script to register it!

like image 21
Dave Avatar answered Oct 23 '22 17:10

Dave



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!