ccleaner: remove installed cruft
- Add an elevated call to
Unregister-ScheduledTaskto "post_uninstall" - add dependency on gsudo
CCleaner (a.k.a. crap-cleaner) is now registering an admin privileged scheduled task that persist scoop uninstall, a.k.a. crap.
Ironic
- [x] Use conventional PR title:
<manifest-name[@version]|chore>: <general summary of the pull request> - [x] I have read the Contributing Guide
Summary by CodeRabbit
- Chores
- Added a new system dependency requirement for installation.
- Updated the packaged version string.
- Improved update metadata to better support automatic updates.
- Enhanced the uninstallation process to remove leftover shortcuts and unregister a related scheduled background task.
Walkthrough
Updated bucket/ccleaner.json: added depends = gsudo, adjusted post_uninstall to unregister the CCleanerCrashReporting scheduled task and remove a .lnk, changed version string normalization and checkver regex to parse the portable build URL, and added an empty autoupdate hash URL field.
Changes
| Cohort / File(s) | Summary |
|---|---|
Manifest and scripts bucket/ccleaner.json |
Added top-level depends field with value "gsudo"; extended post_uninstall to remove CCleaner.lnk and run Unregister-ScheduledTask -TaskName 'CCleanerCrashReporting' -Confirm:0 -ErrorAction Continue via gsudo. |
Versioning & update metadata bucket/ccleaner.json |
Updated version normalization from "6.39.11548" → "6.39"; changed checkver regex to parse portable URL download.ccleaner.com/portable/ccsetup(\d)(\d+).zip with replace $1.$2; added autoupdate hash object with empty url field. |
Sequence Diagram(s)
sequenceDiagram
participant User
participant Uninstaller
participant PowerShell
participant gsudo
note over Uninstaller,PowerShell #DDEEFF: post_uninstall flow (elevated task removal)
User->>Uninstaller: trigger uninstall
Uninstaller->>PowerShell: execute post_uninstall script
PowerShell->>gsudo: Invoke Unregister-ScheduledTask & remove .lnk
gsudo-->>PowerShell: command result (success / continue on error)
PowerShell-->>Uninstaller: post_uninstall completed
Uninstaller-->>User: uninstall finished
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
- Verify
dependsplacement and syntax forgsudo. - Confirm
post_uninstallpaths (shortcut) and scheduled task nameCCleanerCrashReporting. - Validate the new
checkverregex semantics and resulting version normalization. - Ensure
autoupdate.hash.urlbeing empty is intentional or needs a real URL.
Poem
🐰 I nibbled at JSON, neat and spry,
declared a helper to lift things high,
I unlinked a shortcut and hushed a task's drum,
Version trimmed tidy — the updates hum.
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | You can run @coderabbitai generate docstrings to improve docstring coverage. |
✅ Passed checks (1 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title Check | ✅ Passed | The title "ccleaner: remove installed cruft" follows the conventional PR title format specified in the repository template (<manifest-name>: <general summary>). The title directly aligns with the main objective of the pull request: to remove an unwanted administrator-privileged scheduled task that CCleaner creates and that persists after uninstall. The term "cruft" accurately characterizes the leftover scheduled task being targeted for removal. The title is concise, clear, and specific enough that a reviewer scanning the history would immediately understand the primary change. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Your changes did not pass all checks.
Please address the issues in the manifest and comment starting with /verify to rerun the checks.
Invalid manifests
- ccleaner
Before addressing the issues mentioned in this PR, we may need to first resolve the problem of the current manifest being unable to auto-update (see the ccleaner section in result.txt for details). Otherwise, the /verify check will always fail.
Very quick looking around seems like CCleaner changed ownership from Piriform to the Avest/NortonLifeLock corp. It seems they have
- Not keeping the portable version updated
the "portable" link goes to
https://download.ccleaner.com/portable/ccsetup639.zipthe "free" link goes tohttps://bits.avcdn.net/productfamily_CCLEANER7/insttype_FREE/platform_WIN/installertype_ONLINE/build_RELEASE - added malware (see original PR content).
I formulated a workaround, but mostly for the mental exercise. I believe CCleaner should be removed from the bucket
I formulated a workaround, but mostly for the mental exercise. I believe CCleaner should be removed from the bucket
I believe we should contact the official team first to confirm whether they plan to continue providing portable builds in future releases. If they do not intend to maintain them, then CCleaner should first be moved to the Nonportable bucket, followed by initiating the deprecation process for the entry in the Extras bucket.
Alternatively, we could consider using ccsetup_offline_setup.exe as the new installer source. I performed a brief test, and it appears that it cannot be extracted using either Expand-7zipArchive or "innosetup": true. I am not certain whether there are other methods available to extract its contents.
https://community.ccleaner.com/t/cant-open-ccleaner-portable/158548
There in all likelihood will never be a portable CCleaner 7. 7 Runs as a windows service now. portables don’t have services or they aren’t portable. While my question during the beta was answered
CCleaner 7 is designed to be installed on a machine rather than run as a portable executable. This change has allowed us to improve functionality across various parts of the product. We understand that portable use is important to some users, and our approach has been to monitor demand through the beta, to help us plan for the future. So far, we’ve seen less demand for portable than we might have predicted, but we’ll continue to have an eye on this as more users try CCleaner 7.