WinClean v2.8 - Disk Cleanup Reliability
🚀 Disk Cleanup Reliability Improvements
This release significantly improves the reliability of the Disk Cleanup stage, which could previously hang for extended periods even after cleanup completed.
Fixed 🔧
Disk Cleanup hanging issue
- Reduced timeout from 10 minutes to 7 minutes for faster completion
- Replaced
-NoNewWindowwith-WindowStyle Hiddenfor more reliable window handling - Replaced
Wait-Processwith explicitHasExitedloop for better process control - Added progress logging every minute for visibility
Changes Summary
| Setting | Before | After |
|---|---|---|
| Timeout | 10 minutes | 7 minutes |
| Window style | -NoNewWindow |
-WindowStyle Hidden |
| Wait method | Wait-Process |
Explicit HasExited loop |
| Progress feedback | None | Logs every 60 seconds |
New Behavior
[13:00:57] [INFO] Storage Sense task not found, using Disk Cleanup...
[13:01:57] [INFO] Disk Cleanup still running... (60 seconds)
[13:02:57] [INFO] Disk Cleanup still running... (120 seconds)
[13:03:15] [OK] Disk Cleanup completed
What was the problem?
In previous versions, the script could wait up to 10 minutes for cleanmgr.exe even after the Disk Cleanup window had visually completed. This was due to:
- The
-NoNewWindowparameter causing issues with process completion detection Wait-Processnot reliably detecting when cleanmgr.exe finished- Overly long timeout that delayed script completion
Full Changelog: https://github.com/bivlked/WinClean/blob/main/CHANGELOG.md
Previous Release: v2.7