Code:
Windows Registry Editor Version 5.00
; Title : Add CMD Administrator To Context Menu.
; Created By: Paul Black
; Created On: 15-Mar-2020
; ======================================================
; Add Run As Administrator.
[-HKEY_CLASSES_ROOT\batfile\shell\runas]
[HKEY_CLASSES_ROOT\batfile\shell\runas]
"MUIVerb"="CMD - Run As Administrator"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\batfile\shell\runas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6d,00,\
64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,43,00,20,00,22,00,25,00,31,00,22,\
00,20,00,25,00,2a,00,00,00
; ------------------------------------------------------
[-HKEY_CLASSES_ROOT\cmdfile\shell\runas]
[HKEY_CLASSES_ROOT\cmdfile\shell\runas]
"MUIVerb"="CMD - Run As Administrator"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6d,00,\
64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,43,00,20,00,22,00,25,00,31,00,22,\
00,20,00,25,00,2a,00,00,00
; ------------------------------------------------------
[-HKEY_CLASSES_ROOT\cplfile\shell\runas]
[HKEY_CLASSES_ROOT\cplfile\shell\runas]
"MUIVerb"="CMD - Run As Administrator"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\cplfile\shell\runas\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,75,00,\
6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,00,20,00,73,00,68,\
00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,43,00,6f,00,\
6e,00,74,00,72,00,6f,00,6c,00,5f,00,52,00,75,00,6e,00,44,00,4c,00,4c,00,41,\
00,73,00,55,00,73,00,65,00,72,00,20,00,22,00,25,00,31,00,22,00,2c,00,25,00,\
2a,00,00,00
; ------------------------------------------------------
[-HKEY_CLASSES_ROOT\exefile\shell\runas]
[HKEY_CLASSES_ROOT\exefile\shell\runas]
"MUIVerb"="CMD - Run As Administrator"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\exefile\shell\runas\command]
@="\"%1\" %*"
"IsolatedCommand"="\"%1\" %*"
; ------------------------------------------------------
[-HKEY_CLASSES_ROOT\mscfile\shell\RunAs]
[HKEY_CLASSES_ROOT\mscfile\shell\RunAs]
"MUIVerb"="CMD - Run As Administrator"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\mscfile\shell\RunAs\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,\
63,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,\
00,00,00
; ------------------------------------------------------
; Add MSI.
[HKEY_CLASSES_ROOT\Msi.Package\Shell\runas]
"MUIVerb"="CMD - Run As Administrator"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Msi.Package\shell\runas\command]
@=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,\
00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,\
73,00,69,00,65,00,78,00,65,00,63,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,\
00,69,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,00,00,00
; ======================================================
; Add Open Here.
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin]
@="CMD - Open Here As Administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin\command]
@="cmd /c echo|set/p=\"%L\"|powershell -NoP -W 1 -NonI -NoL \"SaPs 'cmd' -Args '/c \"\"\"cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe\"\"\"' -Verb RunAs\""
; ------------------------------------------------------
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHereAsAdmin]
@="CMD - Open Here As Administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHereAsAdmin\command]
@="cmd /c echo|set/p=\"%V\"|powershell -NoP -W 1 -NonI -NoL \"SaPs 'cmd' -Args '/c \"\"\"cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe\"\"\"' -Verb RunAs\""
; ------------------------------------------------------
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHereAsAdmin]
@="CMD - Open Here As Administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHereAsAdmin\command]
@="cmd /c echo|set/p=\"%L\"|powershell -NoP -W 1 -NonI -NoL \"SaPs 'cmd' -Args '/c \"\"\"cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe\"\"\"' -Verb RunAs\""
; ------------------------------------------------------
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHereAsAdmin]
@="CMD - Open Here As Administrator"
"Extended"=-
"Icon"="imageres.dll,-5324"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHereAsAdmin\command]
@="cmd /c echo|set/p=\"%V\"|powershell -NoP -W 1 -NonI -NoL \"SaPs 'cmd' -Args '/c \"\"\"cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe\"\"\"' -Verb RunAs\""
; ======================================================
Best Regards, Paul.