Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like to add a shell context menu for registering .dll files using the command

%windir%Microsoft/Framework/v2.0.50727/regasm.exe "%1" /codebase

which used to work fine in XP. However in Windows 7 this command requires administrator privileges. Is there some way I can make this command run as administrator?

share|improve this question
Why do you want to do that in the GUI? Are you having to do this often for some reason? Why don't you just open a CMD prompt as admin and so it from there? – paradroid Sep 17 '10 at 15:36
yes I have to do it often, as I switch from building source code from one branch to the other and need to register various files, and I don't want to have the hassle of opening a cmd prompt navigating to the folder for the regasm command and then typing the full path of the file to register, which can be long – Sam Holder Sep 17 '10 at 18:39
Why not use the hidden Administrator account when doing this kind of work. user administrator /active:yes...log off and you can now log into the real admin account. – Moab Sep 17 '10 at 19:25
@Moab, I'm and administrator on the machine already. And logging on and off seems like a hassle to do this. – Sam Holder Sep 23 '10 at 9:19
In windows7 user accounts are not like the hidden Admin account, so you are not really the true admin while in a user account like you were in XP. – Moab Sep 23 '10 at 16:52
up vote 3 down vote accepted

To do this, you need this command to launch using the Shell verb "runas".

You can download a reg file here.


;Register modules (Elevated) from the context menu
;March 25, 2008 - (c) 2008 Ramesh Srinivasan


@="&Register (as Administrator)"

@="regsvr32.exe \"%1\""


@="&Register (as Administrator)"

@="regsvr32.exe \"%1\""
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.