यहां कमांड लाइन बैच स्क्रिप्ट है अगर किसी को एक क्लिक समाधान की आवश्यकता है। आपको स्क्रिप्ट के साथ फ़ोल्डर में SubInACL.exe डालना होगा (इसे 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"