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

8,201

Solution 1

There can be difficulties with running .BAT files if you need it to run with administrator access. If right-clicking on the .bat file and choosing run as administrator doesn't work, then try starting an elevated command prompt and running the .bat file from there.

Solution 2

"Run as administrator" should provide sufficient permissions if the user account can use that function.

Share:
8,201

Related videos on Youtube

CJ7
Author by

CJ7

Updated on September 17, 2022

Comments

  • CJ7
    CJ7 over 1 year

    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?

  • user1984103
    user1984103 over 13 years
    @Craig Johnston If the account is not an administrator, and if the user does not know the name and password of an administrator account, they will not be allowed to run applications as an administrator. If the account is not an admin account, they will be asked for valid credentials with which to run the .bat file.
  • CJ7
    CJ7 over 13 years
    How do domains affect this? Is there the possibility that "Run as administrator" will elevate to domain-administrator and not local-administrator?
  • nhinkle
    nhinkle over 13 years
    It will elevate to whatever account you choose. When a computer is a member of a domain, the UAC credentials dialog will prompt you for a username and password; you can choose a local or domain administrator.