1
0
Files
Repository/Windows-Cleanup/readme.md
2025-10-31 08:58:36 +01:00

17 lines
830 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🧹 Windows Component & Disk Cleanup Script
## 🔧 What it does
- On **Windows 10**, runs **DISM** component store cleanup:
- `/AnalyzeComponentStore` then `/StartComponentCleanup /ResetBase`
- Deletes `C:\Windows\Temp\*`
- Preconfigures **Disk Cleanup** (CleanMgr) options via registry (`StateFlags1234`)
and runs `cleanmgr.exe /SAGERUN:1234` to purge:
- Previous Windows installations, Update cleanup, driver packages, thumbnails,
WER files, ESD setup files, upgrade logs, etc.
- Uses **Sysnative** redirection when launched from 32bit context
## ✅ Prerequisites
- Run as **Administrator**
- Target **Windows 10** for the DISM step (script skips it otherwise)
- This is **destructive cleanup**: it may remove *Windows.old*, cached updates,
minidumps, and other data; ensure you dont need rollback files