Friday 25 October 2019

Is there any way to run file explorer as administrator under Windows 10


After install Windows 10, it seems that I lost the ability to run explorer.exe as administrator with a user in administrator group.


The reason I want to do that is, in our team's development environment, we are using a C# exe to do some environment configuration which will start command prompt under administrator mode and subst a drive. As a result those substed drives are not visible within the file explorer since it is run not as administrator. That will be kind of inconvenience and sometimes make mistakes.


I was able to run explorer.exe from task manager with the option "create with privileges" checked and then I can see all the drives in explorer. But now this is not working anymore.


I knew there are other options to workaround this workflow, but just want to make sure that if it is now totally impossible under Windows 10?


Any comment is appreciated.



Answer



I discovered a way to run Explorer as admin some time ago:




  • start regedit.exe and go to the following key. You should be able to copy/paste this string into the regedit address bar:


    HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}




  • make a right click on Permissions and set your user as owner (click on advanced button to be able to take ownership) of the key and give your current user writing permissions.




enter image description here


enter image description here


or use the 3rd party tool RegOwnershipEx to get full control of the key:



  • Next, delete or rename the value RunAs.


Now the Elevated-Unelevated Explorer Factory (which causes that the Run As admin is ignored) is disabled and you can start the Explorer with admin rights.


enter image description here


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...