winutil icon indicating copy to clipboard operation
winutil copied to clipboard

Cleanup the \Windows\WinSxS component folder

Open Mikesco3 opened this issue 2 years ago • 2 comments

Often the Windows\WinSxS gets really bloated with what I understand to be prior installers.
Microsoft suggests a command to clean up the prior left-overs,
See Clean Up the WinSxS Folder
So the idea would be that if the user checked the Disk Cleanup box under tweaks you could also run: Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
or if you want a less aggressive version:
Dism.exe /online /Cleanup-Image /StartComponentCleanup

this could go in the area currently around line 391

  If ( $WPFEssTweaksDiskCleanup.IsChecked -eq $true ) {
            Write-Host "Running Disk Cleanup on Drive C:..."
            cmd /c cleanmgr.exe /d C: /VERYLOWDISK
            $WPFEssTweaksDiskCleanup.IsChecked = $false

or add another check box for it...

Anyways, thank you sooo much for this tool, I use the heck out of it...

Mikesco3 avatar Feb 27 '23 20:02 Mikesco3

Or we could just integrate the DSSU script: https://blog.techygeekshome.info/wpdm-package/disk-space-saver-utility/#Download

ozayturay avatar Mar 22 '23 12:03 ozayturay

I was coming to suggest this same thing. As far as the DSSU script, each individual function could be incorporated separately, but I would not incorporate the whole script as is

meechgalhuquot avatar Mar 29 '23 00:03 meechgalhuquot

Brilliant idea, forgot all about using DISM for component cleanup. Commit 3ad120c Should be live in the next week or so.

ChrisTitusTech avatar Jul 21 '23 22:07 ChrisTitusTech