FolderRisk: Do not touch
- Hidden
Installer C:\Windows\Installer
Windows Installer cache: copies of the .msi and .msp files needed for repair, update and uninstall.
What it’s for
C:\Windows\Installer is the Windows Installer cache: it keeps the files Windows needs to repair, update or uninstall a product installed with MSI. Without it, those operations ask for the original media.
What it contains
- A copy of every installed
.msipackage, under a random name such as1a2b3c.msi. - Patch
.mspfiles: Microsoft states they are cached here. {GUID}subfolders with product icons, and$PatchCache$, which keeps baseline files so patches can be uninstalled.
The random name tells you nothing about the product. The registry links them: each product’s LocalPackage value points to its .msi (see the command below).
Risks and best practices
- Delete nothing by hand: Microsoft advises against it. Without its
.msi, a product can only be repaired, updated or uninstalled with the original media, if it still exists. - An
.mspshould only go away by uninstalling the patch from the product it applies to. - To save space, uninstall software you no longer use. Avoid “cleanup” tools that remove files they consider orphaned: they get it wrong, and a lost file cannot be rebuilt.
Useful commands
# Size by extension (read-only)Get-ChildItem "$env:windir\Installer" -Force -File | Group-Object Extension | Select-Object Name, Count, @{n='MB';e={[math]::Round(($_.Group | Measure-Object Length -Sum).Sum / 1MB,1)}}
# Product -> cached .msi (LocalPackage)Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\*\InstallProperties' | Select-Object DisplayName, LocalPackage | Sort-Object DisplayName