Will doing "Run as administrator" on a .BAT file allow regsvr32 enough privlieges to register a DLL or OCX?

The .bat file contains:

regsvr32 -u SomeOCX.ocx
regsvr32 SomeOCX.ocx

Or, does the logged in user need to be an administrator?


There can be issues with running .bat files by right-clicking and choosing Run as Administrator. Another option is to start an elevated command prompt and execute the .bat file from there.

| improve this answer | |

if you not administrator then you cannot do "Run as administrator" (but you allways can use "RunAs")

and ofcouse "Run as administrator" gives you all necessary rights to do "regsvr32"

| improve this answer | |

run as administrator should allow it to register as long as it is setup by a domain administrator.

Did you tested it ?

| improve this answer | |
  • What needs to be setup by a domain administrator? – CJ7 Jun 4 '10 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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