Skip to content

Instantly share code, notes, and snippets.

@LesFerch
Last active October 30, 2024 07:56
Show Gist options
  • Save LesFerch/a7e43762bb84f18c8ef6ccdfe606eff8 to your computer and use it in GitHub Desktop.
Save LesFerch/a7e43762bb84f18c8ef6ccdfe606eff8 to your computer and use it in GitHub Desktop.
Registry Setting That Prevents Explorer From Being Run as Administrator
Windows Registry Editor Version 5.00
;The registry setting shown below requires Trusted Installer privileges to change.
;If the "RunAs" value is deleted or renamed or the "Interactive User" data is changed to something else,
;such as an empty string, you will then be able to right-click Explorer and "Run as Administrator".
;Of course, you can then create a shortcut to Explorer that has "Run as Administrator" checked.
;Disabling this restriction may have consequences. One concern regards what happens if you are at a
;"Run as Administrator" or "Run as Trusted Installer" Cmd prompt and then kill all Explorer processes
;and restart Explorer. I tried it in a VM and it appears that, regardless of the setting, Windows
;protects you from this potential foot gun. However, I make no promises, so do this at your own risk!
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}]
"RunAs"=""
;[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}]
;"RunAs"="Interactive User"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment