takeown /F "c:\windows\system32" /A
takeown /F "c:\windows\system32\*.*" /A
takeown /F "c:\windows\syswow64" /A
takeown /F "c:\windows\syswow64\*.*" /A
takeown /F "c:\windows\system32\en-US" /A
takeown /F "c:\windows\system32\en-US\*.*" /A
takeown /F "c:\windows\SystemResources" /A
takeown /F "c:\windows\SystemResources\*.*" /A

rem ALL_APPPLICATION_PACKAGES (S-1-15-2-1)
rem ALL_RESTRICTED_APPLICATION_PACKAGES (S-1-15-2-2)

rem icacls.exe C:\windows\system32 /C /grant "APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES":F
rem icacls.exe C:\windows\system32 /C /grant "APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES":F
icacls.exe C:\windows\system32 /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\system32 /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\system32 /C /grant "NT AUTHORITY\SYSTEM" :F
icacls.exe C:\windows\system32 /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\system32 /C /grant BUILTIN\Users:F
icacls.exe C:\windows\system32 /C /grant "NT SERVICE\TrustedInstaller" :F

rem icacls.exe C:\windows\system32\*.* /C /grant *S-1-15-2-1:F
rem icacls.exe C:\windows\system32\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\system32\*.* /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\system32\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\system32\*.* /C /grant "NT AUTHORITY\SYSTEM":F
icacls.exe C:\windows\system32\*.* /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\system32\*.* /C /grant BUILTIN\Users:F
icacls.exe C:\windows\system32\*.* /C /grant "NT SERVICE\TrustedInstaller":F

rem icacls.exe C:\windows\syswow64 /C /grant "APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES":F
rem icacls.exe C:\windows\syswow64 /C /grant "APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES":F
icacls.exe C:\windows\syswow64 /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\syswow64 /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\syswow64 /C /grant "NT AUTHORITY\SYSTEM" :F
icacls.exe C:\windows\syswow64 /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\syswow64 /C /grant BUILTIN\Users:F
icacls.exe C:\windows\syswow64 /C /grant "NT SERVICE\TrustedInstaller" :F

rem icacls.exe C:\windows\syswow64\*.* /C /grant *S-1-15-2-1:F
rem icacls.exe C:\windows\syswow64\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\syswow64\*.* /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\syswow64\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\syswow64\*.* /C /grant "NT AUTHORITY\SYSTEM":F
icacls.exe C:\windows\syswow64\*.* /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\syswow64\*.* /C /grant BUILTIN\Users:F
icacls.exe C:\windows\syswow64\*.* /C /grant "NT SERVICE\TrustedInstaller":F

rem icacls.exe C:\windows\system32\en-US /C /grant "APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES":F
rem icacls.exe C:\windows\system32\en-US /C /grant "APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES":F
icacls.exe C:\windows\system32\en-US /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\system32\en-US /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\system32\en-US /C /grant "NT AUTHORITY\SYSTEM" :F
icacls.exe C:\windows\system32\en-US /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\system32\en-US /C /grant BUILTIN\Users:F
icacls.exe C:\windows\system32\en-US /C /grant "NT SERVICE\TrustedInstaller" :F

rem icacls.exe C:\windows\system32\en-US\*.* /C /grant *S-1-15-2-1:F
rem icacls.exe C:\windows\system32\en-US\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\system32\en-US\*.* /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\system32\en-US\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\system32\en-US\*.* /C /grant "NT AUTHORITY\SYSTEM":F
icacls.exe C:\windows\system32\en-US\*.* /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\system32\en-US\*.* /C /grant BUILTIN\Users:F
icacls.exe C:\windows\system32\en-US\*.* /C /grant "NT SERVICE\TrustedInstaller":F

rem icacls.exe C:\windows\SystemResources /C /grant "APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES":F
rem icacls.exe C:\windows\SystemResources /C /grant "APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES":F
icacls.exe C:\windows\SystemResources /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\SystemResources /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\SystemResources /C /grant "NT AUTHORITY\SYSTEM" :F
icacls.exe C:\windows\SystemResources /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\SystemResources /C /grant BUILTIN\Users:F
icacls.exe C:\windows\SystemResources /C /grant "NT SERVICE\TrustedInstaller" :F

rem icacls.exe C:\windows\SystemResources\*.* /C /grant *S-1-15-2-1:F
rem icacls.exe C:\windows\SystemResources\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\SystemResources\*.* /C /grant *S-1-15-2-1:F
icacls.exe C:\windows\SystemResources\*.* /C /grant *S-1-15-2-2:F
icacls.exe C:\windows\SystemResources\*.* /C /grant "NT AUTHORITY\SYSTEM":F
icacls.exe C:\windows\SystemResources\*.* /C /grant BUILTIN\Administrators:F
icacls.exe C:\windows\SystemResources\*.* /C /grant BUILTIN\Users:F
icacls.exe C:\windows\SystemResources\*.* /C /grant "NT SERVICE\TrustedInstaller":F

copy c:\windows\system32\mstsc.exe c:\windows\system32\mstsc.exe.xxx
copy c:\windows\system32\mstscax.dll c:\windows\system32mstscax.dll.xxx
copy c:\windows\system32\en-US\mstsc.exe.mui c:\windows\system32\en-US\mstsc.exe.mui.xxx
copy c:\windows\system32\en-US\mstscax.dll.mui c:\windows\system32\en-US\mstscax.dll.mui.xxx
copy C:\windows\SystemResources\mstsc.exe.mun C:\windows\SystemResources\mstsc.exe.mun.xxx
copy C:\windows\SystemResources\mstscax.dll.mun C:\windows\SystemResources\mstscax.dll.mun.xxx
 
copy mstsc.exe c:\windows\system32\mstsc.exe
copy mstscax.dll c:\windows\system32mstscax.dll
copy mstsc.exe.mui c:\windows\system32\en-US\mstsc.exe.mui
copy mstscax.dll.mui c:\windows\system32\en-US\mstscax.dll.mui
copy mstsc.exe.mun C:\windows\SystemResources\mstsc.exe.mun
copy mstscax.dll.mun C:\windows\SystemResources\mstscax.dll.mun
