How to run Explorer as Administrator.

Technical Q&A involving operating systems, networking, software, and hardware issues.

Moderator: jasonb

Post Reply
User avatar
jasonb
Site Administrator
Posts: 105
Joined: Tue Apr 22, 2003 1:54 pm
Location: Toronto, Canada
Contact:

How to run Explorer as Administrator.

Post by jasonb »

Click here for an article from Winaero that describes how to do this. Essentially, you need to take ownership of HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}, then rename (or delete) the RunAs entry. It also says to change ownership back to what it was once you're done - and there's a link to a tool that makes this easy.

This is not perfect. When you do this, you're left with an explorer.exe process remaining behind that you need to manually kill. Also, I found it humorous that when I tried setting AppCompatFlags / Layers for C:\Windows\Explorer.exe to have it always run as Administrator - on logging in again I ended up with a black screen when Explorer itself didn't load properly. (It was a simple matter to fix this by running RegEdit via the Task Manager, removing the layer, and then logging in again.)

I experimented with this entire thing only because when I work with ThinApp projects and double-click on their build.bat file from within Explorer they fail to execute properly. To have them function I need to right-click and run as Administrator. (I've already used AppCompatFlags to have cmd.exe always run as Administrator, but it seems batch files invoke Explorer rather than cmd - and I haven't yet found an elegant way around this.)
Post Reply