Skip to content

WinClean v2.8 - Disk Cleanup Reliability

Choose a tag to compare

@bivlked bivlked released this 16 Jan 10:16
· 17 commits to main since this release

🚀 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 -NoNewWindow with -WindowStyle Hidden for more reliable window handling
  • Replaced Wait-Process with explicit HasExited loop 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:

  1. The -NoNewWindow parameter causing issues with process completion detection
  2. Wait-Process not reliably detecting when cleanmgr.exe finished
  3. Overly long timeout that delayed script completion

Full Changelog: https://github.com/bivlked/WinClean/blob/main/CHANGELOG.md

Previous Release: v2.7