How do I run the Windows 7 Explorer shell with Administrator Privileges by default?

119,535

Solution 1

As far as I know you can't create an account like this, but if you log in as "Administrator" (Not merely as an account that is a member of the Administrators group - that's not good enough.) then everything you launch will be launched elevated.

Not something you should do normally, but if you need to then you need to.

Solution 2

This is a terrible idea. You want to go back to the Win XP days where everything runs as Administrator? You're giving up all the security gains made by Vista and Windows 7. GUI applications should all invoke UAC, so there's no need for this hack in that case.

If you need to run command line apps as administrator, simply open an administrator command prompt. It's very easy, just press WIN, type 'cmd', then press ctrl+shift+enter. Or even simpler, you can make a shortcut to cmd, and in the settings set it to 'Run as administrator'

Solution 3

As to the original question if you are running the ENTIRE shell with admin rights you might as well log in with an admin account and be done with it. You're basically destroying the purpose of the account division as far as security is concerned. What I'd recommend is running explorer as a separate administrator account.

Easy solution for launching explorer as admin:

  • Run a CMD window as your admin account.
  • Type 'explorer'
  • Enjoy explorer with admin rights

Note: This does not work in a PowerShell window and I've no clue why. For example.. Launching a PowerShell window as an admin user (and I'm not talking about run as administrator here) and entering 'explorer' or 'invoke-item explorer.exe' will launch the window but with only user rights; however, typing 'CMD' in that same PowerShell window and then just 'explorer' will work.

Other super fun hidden thing note: Most people don't know this but there's a check box to always run PowerShell windows as administrator so you don't have to always shift-right click and select it (since most of the stuff you do in PowerShell requires admin anyway). To find it:

  1. If pinned (or in the dumbass metro thing probably too) (win 7/8) to taskbar Shift+RightClick the shortcut otherwise just go to properties of shortcut
  2. Click Properties
  3. Click Shortcut Tab
  4. Click Advanced...
  5. Check box 'Run as administrator';ok;ok
  6. Live life happier

Solution 4

Why not turn on auto elevate for the built-in Administrator account?

Launch Local Security Policy

Go to: Local Policies \Security Options

Look for: User Account Control: Admin Approval Mode For The Built-in Administrator Account and make sure it's disabled (this is the default value anyway).

Now you can Fast Switch to the built-in Administrator account for all your admin needs.

Solution 5

It is correct that starting with Win 7 there is no simple way to run Windows Explorer with admin privileges. The normal "Run as Administrator" is by default ignored for Explorer.

But there is a nice workaround if you don't need these elevated permissions very often:

The file dialogs (Open, Save as, ...) of any Windows applications are nearly complete Explorer incarnations, and they inherit the user rights of their application. So if you start Notepad as Administrator and open the "File Open" dialog, you can use it to manipulate files with Administrator privileges. You can modify and delete protected files and you can change ownership to your standard user.

Share:
119,535

Related videos on Youtube

Barry Kelly
Author by

Barry Kelly

Updated on September 17, 2022

Comments

  • Barry Kelly
    Barry Kelly over 1 year

    The Windows 7 shell (Explorer) can be made to run with Administrator privileges by this manual process:

    1. Kill Explorer shell by holding down Shift+Ctrl, right-clicking the Shut down button in the Start Menu, and selecting Exit Explorer
    2. Start Task Manager with Ctrl+Shift+Esc
    3. Elevate Task Manager privileges by going to Processes tab and selecting Show processes from all users
    4. Then start up a new instance of the shell by File | Run in Task Manager, typing in explorer, and selecting the Create this task with administrative privileges.

    After following the above process, the Windows shell will be running with administrative privileges, and any programs it launches will also have administrative privileges. This makes performing tasks that require the privilege far easier, particularly for command-line applications, which usually fail silently or with an Access denied. message rather than giving an opportunity to use UAC to elevate the process's privileges.

    What I'm interested in, though, is creating an account which uses a privileged shell by default, rather than having to follow this laborious process every time. How can it be done?

    • Matt
      Matt over 14 years
      have you tried just opening explorer.exe properties, going to compatibility and selecting "Run as administrator"? Not in front of Win7 to try this myself.
    • Barry Kelly
      Barry Kelly over 14 years
      Compatibility tab is disabled for Windows component programs.
    • Alex
      Alex over 14 years
      Isn't this exactly the same thing as disabling UAC? After all, UAC works by causing the explorer to drop its administrative privileges on startup, and then allowing you to elevate permission later on.
    • Bartosz Popiela
      Bartosz Popiela almost 14 years
      Thank you very much for the information above, this will help me testing Drag&Drop while continuing to run the IDE as administrator to enable COM registration ;)
    • Ian Boyd
      Ian Boyd almost 13 years
      Example where this is useful. There is a folder you want to browse to that only Administrators have access to. You're an administrator, but not really because UAC is enabled. Normally you would simply elevate a 2nd copy of Windows Explorer, so you can then browse into that folder. Unfortunately you cannot run a 2nd copy of explorer.exe elevated. So the only fix is to kill your existing copy of explorer and run a fresh copy elevated. The tedious required steps given in this question are the required steps. A better solution would be better.
    • virtualnobi
      virtualnobi almost 9 years
      @BarryKelly - old thread, but new info: On Windows 8.1, "Run as Admin" works nicely. So I have shortcut to cmd.exe, check this, and the shell even gets an orange frame. Only disappointment is that the "Start in Folder" option is not respected anymore.
    • underscore_d
      underscore_d almost 9 years
      +1 for this and Ian Boyd highlighting a key usage - and therefore a real shortcoming in how Windows handles Administrator-privileged folders in explorer
    • deed02392
      deed02392 almost 8 years
      @IanBoyd I'd welcome a suggestion for a better way of graphically browsing directories where you lack access. Right now I'm just trying to explore the contents of a system disk from a PC that's failed so I can back things up. Exploring via an admin PS prompt is painful mainly due to lack of thumbnails when deciding what media I want to backup.
  • davr
    davr over 14 years
    Ok then, my answer is here for the sake of other users browsing who might not realize that this is a bad idea. I did try to add something helpful, how you can accomplish your objectives in a different way. If you gave more details on what your objectives really were, perhaps people could give other advice as well.
  • G-Man Says 'Reinstate Monica'
    G-Man Says 'Reinstate Monica' about 9 years
    You also get an option a new explorer window in a new process if you (Shift)+(right-click) on a folder in the directory tree, in the left pane.  "... you should be able to run a 2nd copy of explorer.exe elevated..."  OK, have you found a way?
  • Langhard
    Langhard about 9 years
    This is not the same G-Man. If you Shift-Right click you get a new window, but this window runs under the same task (process).
  • G-Man Says 'Reinstate Monica'
    G-Man Says 'Reinstate Monica' about 9 years
    See this.
  • jiggunjer
    jiggunjer over 8 years
    You need to 'unhide' the administrator account first.