Right-click ELEVATED Explorer++ (w/ Reg file workaround)

Share any ideas you have on improving Explorer++
Post Reply
Misterd
Posts: 10
Joined: Wed Jul 18, 2012 4:58 am

Right-click ELEVATED Explorer++ (w/ Reg file workaround)

Post by Misterd »

I have always wondered why Explorer++ doesn't do Elevation.

Where I work, we use Explorer++ to do file changes without changing file permissions in Windows 7.

If you ever get this type of dialog:
https://www.google.ca/search?q=you'll+n ... permission
and click Continue, you've just changed the file permissions and made your computer less secure.

Wouldn't it be nice to be able to just right-click on a folder in Window's Explorer to launch Explorer++ to the same folder but elevated?

Here is one way to do it:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Runas]
@="Explorer++ (To prevent changing Perms)"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\shell\Runas\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
  00,46,00,69,00,6c,00,65,00,73,00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,\
  65,00,72,00,2b,00,2b,00,5c,00,65,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,\
  00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,25,00,31,00,22,00,\
  00,00
;"C:\Program Files\Explorer++\explorer++.exe" "%1"

[HKEY_CLASSES_ROOT\Drive\shell\Runas]
@="Explorer++ (To prevent changing Perms)"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Drive\shell\Runas\Command]
@=hex(2):22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
  00,46,00,69,00,6c,00,65,00,73,00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,\
  65,00,72,00,2b,00,2b,00,5c,00,65,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,\
  00,2b,00,2b,00,2e,00,65,00,78,00,65,00,22,00,20,00,22,00,25,00,31,00,22,00,\
  00,00
;"C:\Program Files\Explorer++\explorer++.exe" "%1"
[/size]

The catch is that Explorer++.exe MUST be located in the "C:\Program Files\Explorer++\ folder.

If this was made part of Explorer++, David could change the path to wherever Explorer++.exe is currently located on YOUR machine.
Also, if was to make its way into Explorer++, I wouldn't use the \RunAs\ key method since you can only have ONE program use it per class in the registry.

CAVEAT: Explorer++ does NOT tell you if it is running elevated or not.
David Erceg
Site Admin
Posts: 933
Joined: Sat Apr 18, 2009 1:46 am

Re: Right-click ELEVATED Explorer++ (w/ Reg file workaround

Post by David Erceg »

Thanks Misterd, I'm sure this will be helpful for some people.

On the last point, Explorer++ actually can show the user group it's running under if you check Tools > Options > Window > Show privilege level in title bar.
tallguy297
Posts: 30
Joined: Thu Dec 05, 2013 8:19 am

Re: Right-click ELEVATED Explorer++ (w/ Reg file workaround

Post by tallguy297 »

Misterd in response to your registry file work around the only line that really matters is the "HasLUAShield"="". See below.

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\openinexplorer++]
@="Open In Explorer++"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\shell\openinexplorer++\command]
@="\"C:\\Windows\\Explorer++.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Folder\shell\openinexplorer++]
@="Open In Explorer++"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Folder\shell\openinexplorer++\command]
@="\"C:\\Windows\\Explorer++.exe\" \"%1\""
[/size]
Placing an entry in the RunAS section is unnecessary. In my scenario I use openinexplorer++ instead as my RunAS entry is used to modified file/directory permissions as set by my windows tweaking tool. However you can use any name as long as it doesn't conflict with existing entries.

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"HasLUAShield"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="C:\\Windows\\system32\\cmd.exe /c C:\\Windows\\system32\\takeown.exe /f \"%1\" /r /d y && C:\\Windows\\system32\\icacls.exe \"%1\" /grant administrators:F /t"
"IsolatedCommand"="C:\\Windows\\system32\\cmd.exe /c C:\\Windows\\system32\\takeown.exe /f \"%1\" /r /d y && C:\\Windows\\system32\\icacls.exe \"%1\" /grant administrators:F /t"
[/size]
Also, why it is necessary to have the shell command as a Unicode binary entry when straight text works just as well? Also the default location can be changed.

For those interested, I have updated my installer to cover issues raised in this post. Click here to go the help & support discussion. :ugeek:
Post Reply