Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows Server 2016 / How to Run Windows File Explorer Elevated (as Administrator)?

April 16, 2021 Windows 10Windows Server 2016

How to Run Windows File Explorer Elevated (as Administrator)?

File Explorer always starts in Windows with least privileges. Even if you click on the executable file C:\Windows\explorer.exe and try to start it in the “Run as administrator” mode, the privilege elevation won’t occur. In this article we’ll look at a simple trick to run File Explorer with elevated permissions (as administrator).

Windows 10 explorer.exe run as administrator

You Don’t Have Permission to Access Folder, Click Continue to Permanently Get Access

When working with Windows File Explorer under an account that is added to the local administrators group (or even under the built-in Windows administrator), you often have to open system folders, user profiles or edit protected system files. When trying to open such directory/file in Windows Explorer in the current context, the UAC warning appears prompting to grant access and elevate privileges.

What it looks like: let’s try to open a system folder C:\Windows\System32\Config in File Explorer. User Account Control window appears to warn that you don’t currently have permission to access this folder:

You don’t currently have permission to access this folder.
Click Continue to permanently get access to this folder.

But you can get the access through the UAC privilege elevation by clicking Continue.

You don’t currently have permission to access this folder. Click Continue to permanently get access to this folder

When you click Continue, UAC temporarily elevates the privileges of your explorer.exe process and grants NTFS full control permissions to your account.

Known issues:

It’s ok, but if you do , your account will be explicitly added to the folder NTFS permissions. But all you want to do is to view the contents of the folder, and not to change its ACL! What if there are multiple administrators on the server? Then each of them will change the directory ACL when accessing the folder.

After the permissions have been changed, all programs running under your user account have Full Control rights on this folder (even if the program isn’t elevated) and even after your account is removed from the local Administrators group.

uac changed acl in ntfs folder permissions

This behavior of File Explorer creates problems when managing shared network folders on Windows Server. As a workaround, many Windows administrators prefer to manage shared folders over a UNC path (\\mun-fs01\docs\) instead of locally. In this case, you don’t need to elevate privileges when accessing the directory, and hence there are no changes to NTFS ACLs.

Naturally, when you often work with system files or user folders, this pop-up UAC notification becomes annoying. Since I don’t want to disable UAC, I had find the  way to start the Exploler.exe elevated.

How to Run File Explorer as Administrator on Windows 10 and Windows Server?

The Windows Explorer process starts when a user logs on with the standard user access token. You cannot elevate the Explorer.exe process in the standard way. Also you won’t be able to start the second explorer process in the “Run as admin” mode (this is blocked by the CreateExplorerShellUnelevatedTask task). Windows File Explorer doesn’t support running multiple instances of the explorer.exe process in different security contexts in an interactive user session. Therefore, you first need to end the current explorer.exe process in your user session.

You can kill the explorer.exe process from Task Manager or with the following command in the PowerShell console (be sure to run powershell.exe as an administrator):

taskkill /f /FI "USERNAME eq $env:UserName"/im explorer.exe

SUCCESS: The process "explorer.exe" with PID 3208 has been terminated.

In order to run the explorer.exe process as administrator, use the command:

c:\windows\explorer.exe /nouaccheck

explorer.exe /nouaccheck - run elevated

(NO|UAC|CHECK)

These commands will terminate the explorer.exe process for the current user and start a new one, which will inherit the elevated access token that powershell.exe is run with.

Or you can start a new privileged explorer process from Task Manager -> File -> Run New Task -> explorer.exe /nouaccheck (be sure to check the option “Create this task with administrative privileges”).

run explorer with administrative privileges nouaccheck

You can make sure that Windows Explorer is now running elevated in the Task Manager. Open the Task Manager and go to the Details tab. Right-click any column, click Select columns and enable Elevated column to be displayed.

add the elevated column in task manager

As you can see, explorer.exe is now having attribute Elevated=Yes.

elevated explorer.exe process

After that Explorer will be able to open any system folder without a UAC warning, and all child processes run from Windows Explorer will run elevated.

For example, it is convenient when you need to edit hosts file (c:\windows\system32\drivers\etc): you can open it right from Explorer using Notepad, with no need to start a separate notepad.exe process as administrator or different user.

If you often need to run explorer.exe in the elevated mode, you can create a *.bat or *.ps1 file with above commands on your desktop.

When you’re done, be sure to restart the explorer.exe in non-elevated mode:

taskkill /f /FI "USERNAME eq $env:UserName"/im explorer.exe
explorer.exe

As you can see, now the Elevated value for the explorer.exe process has changed to No.

not-elevated explorer process

This Windows Explorer elevation trick works on both Windows Server 2016/2019 and all Windows 10 builds.

On Windows Server 2012/R2 and Windows 8, in order to run the Explorer process elevated, you need to open cmd.exe as administrator and run the command:
tskill explorer & explorer

 tskill explorer & explorer

11 comments
7
Facebook Twitter Google + Pinterest
previous post
Using Malicious Software Removal Tool (MRT.exe) on Windows
next post
Shrinking VMDK Virtual Disk Size on VMWare ESXi

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

How to View and Change BIOS (UEFI) Settings...

September 13, 2023

11 comments

Jeff October 26, 2016 - 2:18 pm

I tried this from a Windows 10 LTSB 2015 machine and it didn’t work.  I was excited to see the article because you are correct this is a pain.  Do you have any suggestions?

Reply
admin November 10, 2016 - 6:24 am

This trick only works on Windovs Server 2012 R2

Reply
Jeff November 10, 2016 - 2:47 pm

Ok, that makes sense then.  Thanks.

Reply
lia June 21, 2018 - 11:21 am

Not working on Windows Server 2016. Always starts explorer.exe without Elevated privileges

Reply
k March 22, 2019 - 12:11 am

Try this – start an elevated command prompt, open task manager, right-click explorer.exe in details pane, and ‘End task’. Then, switch to the command prompt and run explorer. Seems to prevent the auto-restart of explorer.exe when you try it the above way.

Reply
Rambler April 17, 2019 - 2:42 pm

What you need to do on W10/WS2016 and newer is:
– open Task Manager
– kill Explorer.exe process
– click the File menu, select Start new task, type: explorer /nouaccheck, be sure to tick the ‘Create this task with administrative privileges’
– click OK, there’s your elevated Explorer again

Reply
Chris February 8, 2020 - 1:28 am

worked beautifully thanks brskie

Reply
BAKEMONO April 16, 2021 - 2:42 pm

Reading the title i thought it would be a way, as being a simple user, launching explorer as an administrator…

So i tried the trick New-ItemProperty -Path “HKCU:\Software\Policies\Microsoft\Windows\CurrentVersion\Explorer” -Name ShowRunasDifferentuserinStart -Value 1 -PropertyType DWORD -Force but Explorer key doesn’t exist (win10 20H2) and i don’t have right to create it, and, after the modification of GPEDIT.msc, as the explorer is not available in the start menu to run it as another user this is not possible either (knowing that it would have to be able to mix the two techniques when you have to close the explore … so no solution)

Reply
max April 16, 2021 - 2:50 pm

This trick assumes that you are logon Windows with an account that is a member of the local Administrators group.

Reply
e.ostenhof September 9, 2021 - 4:09 am

ExplorerShellUnelevated
\CreateExplorerShellUnelevatedTask

S-1-5-18

false
false
false
IgnoreNew
6
true

PT10M
PT1H
true
false

true

C:\Windows\explorer.exe
/NOUACCHECK (NO|UAC|CHECK)
These commands will terminate the explorer.exe process for
the current user and start a new one, which will inherit
the elevated access token that powershell.exe is run with.

Reply
dk July 18, 2023 - 7:11 am

CreateExplorerShellUnelevatedTask is a system task created by Windows to prevent users and apps from running Windows Explorer process elevated

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top