Qui c'è lo script batch a riga di comando se qualcuno ha bisogno di una soluzione con un solo clic. Dovrete mettere SubInACL.exe nella cartella con lo script (prendetelo qui da Microsoft).
@echo off
Setlocal EnableDelayedExpansion
:check_admin
NET FILE 1>NUL 2>NUL
IF ERRORLEVEL 1 (
cls
echo Starting as admin ...
powershell "saps -filepath %0 -verb runas" >nul 2>&1
exit
)
cls
:set_privileges
rem Enable explorer to run privileged, src: https://superuser.com/a/591082/145585
echo Setting permissions ...
rem change owner to Administrators
rem should report: Done: 1, Modified 1, Failed 0, Syntax errors 0
%~dp0subinacl.exe /noverbose /statistic /subkeyreg "HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}" /setowner=administrators >nul 2>nul
rem give Administrators full permission
rem should report: Done: 1, Modified 1, Failed 0, Syntax errors 0
%~dp0subinacl.exe /noverbose /statistic /subkeyreg "HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}" /grant=administrators=f >nul 2>nul
echo Rename registry entry ...
powershell -ExecutionPolicy Bypass -Command "Rename-ItemProperty -Path 'Registry::HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}' -Name 'RunAs' -NewName '_Runas' -ErrorAction SilentlyContinue"
:run_explorer
echo Starting explorer ...
start "" /MAX "c:\windows\explorer.exe" "%~dp0"