microsoft / microsoft/winget-pkgs

[Package Issue]: `Piriform.CCleaner` - Manual installation being converted to `Piriform.CCleaner.ProTrial`

Open
#150,484 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Help-Wanted Issue-Bug Package-Update
Dominant language
No language data
Stars
11.1k
Forks
9.7k
Avg merge
1h 32m
Merged PRs (30d)
376

Description

Please confirm these before moving forward
  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue

Other

Brief description of your issue

When installing CCleaner Free (Piriform.CCleaner) manually, Winget will attempt to update/convert the package to Piriform.CCleaner.ProTrial when a higher version number is available.

I believe this is because, while Piriform.CCleaner and Piriform.CCleaner.ProTrial use different installers, they both write the same ARP entries.

Steps to reproduce
  1. Downloaded the previous release of Piriform.CCleaner.
    In this case, 6.22.
    winget download Piriform.CCleaner --version 6.22
    
  2. Manually install Piriform.CCleaner onto the system.
    Run the downloaded installer: follow interactive prompts, or use /S for silent.
  3. Check for updates using Winget.
    Because we downloaded/installed the previous version, we should find a new version of Piriform.CCleaner. In this case, 6.23.
    winget update
    
  4. Instead, Winget finds an update for the Piriform.CCleaner.ProTrial package.
    Name     Id                         Version        Available    Source
    ----------------------------------------------------------------------
    CCleaner Piriform.CCleaner.ProTrial < 6.23.0.11010 6.23.0.11010 winget
    1 upgrades available.
    

Example:
Final Result

[!NOTE]
This is not the case if you install using Winget. Only manual installations have the issue.

> winget install Piriform.CCleaner --version 6.22
Found CCleaner [Piriform.CCleaner] Version 6.22
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.ccleaner.com/ccsetup622.exe
  ██████████████████████████████  79.5 MB / 79.5 MB
Successfully verified installer hash
Starting package install...
Successfully installed
> winget update
Name     Id                Version Available Source
---------------------------------------------------
CCleaner Piriform.CCleaner 6.22    6.23      winget
1 upgrades available.

WinGet-InstallOld.log
WinGet-UpdateCorrect.log
Working correctly using winget install and update. No manual install.

Actual behavior

Winget is mistaking Piriform.CCleaner and Piriform.CCleaner.ProTrial when installed manually.

I have only noticed believing Piriform.CCleaner is Piriform.CCleaner.ProTrial, not the reverse. However, I have not done any testing for the reverse, so I cannot rule that out.

Expected behavior

Winget should be able to differentiate between Piriform.CCleaner and Piriform.CCleaner.ProTrial when they are manually installed outside of winget. Specifically, winget should update 6.22 Piriform.CCleaner to 6.23 Piriform.CCleaner, NOT update/convert to 6.23.0.11010 Piriform.CCleaner.ProTrial.

Environment
Windows Package Manager v1.7.10861
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.1
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0

Winget Directories                 
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links               
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
Screenshots and Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior with the documented winget download, manual installation, and winget update commands. Compare the manifests under manifests/p/Piriform/CCleaner and manifests/p/Piriform/CCleaner/ProTrial/; done means manual installation of Piriform.CCleaner is identified and updated as that package rather than converted to Piriform.CCleaner.ProTrial.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.