![Más de un 'Abrir xxxxx aquí como administrador'](https://rvso.com/image/1466428/M%C3%A1s%20de%20un%20'Abrir%20xxxxx%20aqu%C3%AD%20como%20administrador'.png)
Quiero tener la opción de abrir una ventana de Comando o una ventana de Powershell como Administrador desde los menús contextuales de la unidad y el directorio en Windows.
yo puedo tenercualquieracreando y completando las claves de registro especiales 'runas' que se muestran a continuación, pero ¿hay alguna manera de que pueda tenerambosaparece en el menú contextual y tieneambos¿ejecutar como administrador?
[HKEY_CLASSES_ROOT\Drive\shell\runas]
...
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
...
[HKEY_CLASSES_ROOT\Directory\shell\runas]
...
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
...
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
...
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
...
Respuesta1
El siguiente truco de registro funciona para directorios en Windows 8.1:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\runas]
"HasLUAShield"=""
@="CMD here as administrator"
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /S /K pushd \"%V\""
"DelegateExecute"=""
[HKEY_CLASSES_ROOT\Directory\shell\runasPowerShell]
"HasLUAShield"=""
@="PowerShell here as administrator"
[HKEY_CLASSES_ROOT\Directory\shell\runasPowerShell\command]
@="Powershell Start-Process PowerShell -verb runas -ArgumentList '-noexit', 'Push-Location -literalPath ''\"%V\"'''"
"DelegateExecute"=""
También puede agregar subclaves análogas runas
y para unidades bajo el.runasPowerShell
[HKEY_CLASSES_ROOT\Drive\shell]