Thursday, June 27, 2019

Cleanup Windows 10 WINSXS

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore



Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase



sc stop msiserver
sc stop TrustedInstaller
sc config msiserver start= disabled
sc config TrustedInstaller start= disabled


icacls "%WINDIR%\WinSxS" /save "%WINDIR%\WinSxS_NTFS.acl" /t

takeown /f "%WINDIR%\WinSxS" /r

icacls "%WINDIR%\WinSxS" /grant "%USERDOMAIN%\%USERNAME%":(F) /t

compact /s:"%WINDIR%\WinSxS" /c /a /i *

icacls "%WINDIR%\WinSxS" /setowner "NT SERVICE\TrustedInstaller" /t

icacls "%WINDIR%" /restore "%WINDIR%\WinSxS_NTFS.acl"

sc config msiserver start= demand
sc config TrustedInstaller start= demand

http://woshub.com/how-to-clean-up-and-compress-winsxs-folder-in-windows-8/



Dism.exe /online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /RestoreHealth