@ECHO OFF & CD /D %~DP0
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if "%errorlevel%" NEQ "0" (
 echo: Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
 echo: UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
 "%temp%\getadmin.vbs" & exit 
)
if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs"

takeown /f %windir%\SysWOW64\ieframe.dll /a
cacls %windir%\SysWOW64\ieframe.dll /e /g administrators:f
takeown /f %windir%\SysWOW64\inetcpl.cpl /a
cacls %windir%\SysWOW64\inetcpl.cpl /e /g administrators:f
takeown /f %windir%\system32\ieframe.dll /a
cacls %windir%\system32\ieframe.dll /e /g administrators:f
takeown /f %windir%\system32\inetcpl.cpl /a
cacls %windir%\system32\inetcpl.cpl /e /g administrators:f
if exist %windir%\SysWOW64\ieframe.dllbak (del %windir%\SysWOW64\ieframe.dllbak /q & echo delete ieframe.dllbak success)
if exist %windir%\SysWOW64\inetcpl.cplbak (del %windir%\SysWOW64\inetcpl.cplbak /q & echo delete inetcpl.cplbak success)
if exist %windir%\system32\ieframe.dllbak (del %windir%\system32\ieframe.dllbak /q & echo delete ieframe.dllbak success)
if exist %windir%\system32\inetcpl.cplbak (del %windir%\system32\inetcpl.cplbak /q & echo delete inetcpl.cplbak success)
ren %windir%\SysWOW64\ieframe.dll ieframe.dllbak | echo ren ieframe.dllbak success
ren %windir%\SysWOW64\inetcpl.cpl inetcpl.cplbak | echo ren inetcpl.cplbak success
ren %windir%\system32\ieframe.dll ieframe.dllbak | echo ren ieframe.dllbak success
ren %windir%\system32\inetcpl.cpl inetcpl.cplbak | echo ren inetcpl.cplbak success
copy /Y 64\ieframe.dll %windir%\SysWOW64
copy /Y 64\inetcpl.cpl %windir%\SysWOW64
copy /Y 32\ieframe.dll %windir%\system32
copy /Y 32\inetcpl.cpl %windir%\system32
call "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"

