Permission Change from 5.91 to 6.05 Portable

I extract CCleaner portable to a tools directory, then copy the extracted structure it to C:\Program Files\Portable\CCleaner

The v5.91 version runs fine here, but 6.05 has an App crash with both x86 and x64 versions at launch.


It appears CCleaner 6.05 is doing something new that requires Administrator privileges in this directory.




This is easily recreated by extracting the ZIP into the above directory.




I have backed down to v5.91 which operates without crashing.

Problem signature:

  Problem Event Name:    APPCRASH


  Application Name:    CCleaner64.exe


  Application Version:    6.5.0.10110


  Application Timestamp:    63512f34


  Fault Module Name:    CCleaner64.exe


  Fault Module Version:    6.5.0.10110


  Fault Module Timestamp:    63512f34


  Exception Code:    40000015


  Exception Offset:    0000000000e6131b


  OS Version:    6.1.7601.2.1.0.256.48


  Locale ID:    1033


  Additional Information 1:    ced2


  Additional Information 2:    ced2b0fe725a541c6a31519fe1f18871


  Additional Information 3:    75ed


  Additional Information 4:    75edcc7c50f398fec1f46bea8ca1d547

Hi bgavin:

Are you posting this for information only, or are you requesting assistance?

I'm not sure why you would want to run CCleaner Portable from the C:\Program Files\... directory that has special ownership permissions (I assume you created your C:\Program Files\Portable\CCleaner subfolder manually) and is only intended for programs installed automatically with "regular" .exe or .msi installers, unless you use some sort of software updater utility like SUMo and want your portable apps in a "standard" location like C:\Program Files\... so your software updater scans them for available updates. I run CCleaner Free Portable v6.05 from a removable USB thumb drive, but I can also unzip the ccsetup605.zip files on my hard drive at locations like C:\Users\<myusername>\Downloads or C:\Users\<myusername>\Documents and CCleaner64.exe launches correctly.

-------------

64-bit Win 10 Pro v21H2 build 19044.2130 * Firefox v106.0.5 * Microsoft Defender v4.18.2210.6-1.1.19800.4 * Malwarebytes Premium v4.5.17.221-1.0.1806 * Macrium Reflect Free v8.0.7090 * CCleaner Free Portable v6.05.10110

Dell Inspiron 15 5584, Intel i5-8265U CPU, 8 GB RAM, 256 GB Toshiba KBG40ZNS256G NVMe SSD, Intel UHD Graphics 620</span>

Where I want to run CCleaner is irrelevant.

My comment is entirely about "something changed" in the permissions requirement of the v6 release.


v5.91 and older runs just fine in C:\ProgramFiles\Portable\CCleaner along with several others.

I keep several user accounts on my primary workstation, and C:\ProgramFiles\Portable\CCleaner presents a single instance to each account.

Installing in C:\Users\... is clumsy, and tied to a specific user.


Yes, I could install it to other than C:\ProgramFiles, and will probably have to do this as a work-around.




The current v6 version goes to an instant App Crash... very ungraceful handling of an unexpected exception.


If the developer is going to change something in the permission environment, he should also update his exception handler for a more graceful exit.

I'm old school, and fed up with "installed" code that inserts junk into the registry and directories, never to be removed by "uninstall."

Most developers have not got a clue what the word "uninstall" means... because they leave droppings in the registry and various directories.


Some of these are damn hard to get rid of, especially if installed in a user profile that has since be deleted.




CCleaner Portable still has droppings in the registry, but does not hook nor insert into the DLL chain, or other potential problems.


I so appreciate it is a standalone product.

43 minutes ago, bgavin said:
<div class="ipsQuote_contents">
	<p>
		Where I want to run CCleaner is irrelevant.


		My comment is entirely about "something changed" in the permissions requirement of the v6 release.


		v5.91 and older runs just fine in C:\ProgramFiles\Portable\CCleaner along with several others....
	</p>
</div>

Hi bgavin:

Your error message indicates you use Win 7 SP1 (OS Version: 6.1.7601.2.1.0.256.48). Is your Win 7 SP1 OS fully patched to end of support (14-Jan-2020) and have you installed the KB4474419 security update that adds SHA-2 code-signing support for executables signed with SHA-256 digital certificates? If you aren't sure, search your installed updates at Control Panel | Programs and Features | View Installed Updates for KB4474419. When searching, enter the full KB number in the search box (e.g., "KB4474419" and not a partial string like "4474419".

I don't know if you have a 32-bit or 64-bit OS, but if you browse to C:\Program Files\Portable\CCleaner, right click on the appropriate executable (either CCleaner.exe for 32-bit OS or CCleaner64.exe for 64-bit OS) and choose "Run as Administrator" does the executable run without an APPCRASH?

Did you have the same problem with CCleaner Portable v6.03 and/or v6.04? I believe v6.04 was the first version of CCleaner Portable to create the \Log and \Setup subfolders on the first launch the CCleaner executable (see my 23-Sep-2022 post in xClean's C:\Program Files\CCleaner\CCleanerBugReport.exe as Part of v6.04 Pro). If you have the same APPCRASH with v6.0.4 (but not v6.03) then there could be a problem with the folder permissions of C:\Program Files\Portable\CCleaner that's preventing your CCleaner Portable executables from automatically creating those subfolders.

-------------

64-bit Win 10 Pro v21H2 build 19044.2130 * Firefox v106.0.5 * Microsoft Defender v4.18.2210.6-1.1.19800.4 * Malwarebytes Premium v4.5.17.221-1.0.1806 * Macrium Reflect Free v8.0.7090 * CCleaner Free Portable v6.05.10110

Dell Inspiron 15 5584, Intel i5-8265U CPU, 8 GB RAM, 256 GB Toshiba KBG40ZNS256G NVMe SSD, Intel UHD Graphics 620</span>

KB447419 is already installed.

Win7 Pro is 64-bit and fully patched.


v6.05 "Run as Administrator" does not crash.


I don't have access to previous v6 versions.




The Administrators Group has full control of the parent directory and this user account is a member.


CACLS confirms the same.




It is a permissions thing.


My comment still stands about crashing instead of providing a graceful unhandled exception exit.

4 hours ago, bgavin said:
<div class="ipsQuote_contents">
	<p>
		... v6.05 "Run as Administrator" does not crash. I don't have access to previous v6 versions.




		The Administrators Group has full control of the parent directory and this user account is a member...It is a permissions thing....
	</p>
</div>

Hi bgavin:

If you ever need a previous version of CCleaner Portable just use the direct download link (e.g., https://download.ccleaner.com/portable/ccsetup603.zip for portable build v6.03.10002; https://download.ccleaner.com/portable/ccsetup604.zip for portable build v6.04.10044, etc.).

Browse to C:\Program Files\Portable\CCleaner, right click the CCleaner64.exe executable and choose Properties. On the Compatibility tab click the Change Settings For All Users button, and then enable "Run this program as an administrator". Be sure to apply the changes and then see if CCleaner64.exe launches correctly.

388917300_CCleanerv6_05RunCCleaner64_exeExecutableRunasAdministrator12Nov2022.png.743081b0ad5f59a18b9c4dab55b89f63.png

If that doesn't help you might be interested in reading Pit99's CC 6.x Not Starting on Standard Account about problems running the Slim (installed) edition of CCleaner Free while logged in as a Standard user. Pit99 mentioned the creation of a temporary dynamic link library called gcapi_xxxxxxxxxxxxx.dll that appears for a fraction of a second when you start CCleaner v6.x, and I managed to capture a screenshot of this file when I launched CCleaner Portable v6.05 from my removable USB thumb drive where I keep all my portable apps. I don't know the purpose of this gcapi_xxxxxxxxxxxxxX.dll library but perhaps its brief appearance at launch in your C:\Program Files\Portable\CCleaner folder is part of the problem. Also see @nukecad's workaround <here> in Pit99's thread, who noted that they could only run an installed version of CCleaner Free v6.05 from a Standard user account if they answered "Yes" when prompted to launch CCleaner in final step of the installation wizard (although I have no clue why this would make a difference).

Also note that I use the default English interface of CCleaner and only keep the minimal files required to run a Custom Clean in CCleaner (i.e.,I manually delete the \lang, \x64 and \x86 subfolders after ccsetup6xx.zip is unzipped).

1659628903_CCleanerv6_05Temporarygcapi_dllCreatedatLaunch12Nov2022.png.d6bc02ae4a154bec11d5e838428ab6b2.png

I doubt the CCleaner developers ever intended for users to run CCleaner Portable from the C:\Program Files\... directory so I wouldn't hold out much hope that they will ever change their v6.x executables just to accommodate this possibility, but Pit99's thread would indicate that there could be some glitch in CCleaner Free v6.x (at least the installed version) when you run it from a user account with Standard permissions.

-------------

64-bit Win 10 Pro v21H2 build 19044.2130 * Firefox v106.0.5 * Microsoft Defender v4.18.2210.6-1.1.19800.4 * Malwarebytes Premium v4.5.17.221-1.0.1806 * Macrium Reflect Free v8.0.7090 * CCleaner Free Portable v6.05.10110

Dell Inspiron 15 5584, Intel i5-8265U CPU, 8 GB RAM, 256 GB Toshiba KBG40ZNS256G NVMe SSD, Intel UHD Graphics 620</span>

Thanks so much for the wealth of information as a work-around.

I will put it to good use.




As to the developers, they have a nasty crash from an unhandled exception.


Good programming handles the exceptions as well as the code that works properly.


Just because the developer didn't intend on something doesn't give him license to ignore it when it crashes.




Not my problem though.


You mention Pit99 has a thread that is also permissions related.


Something changed from v5.81 to v6.x regarding permissions.


Where there is smoke.. there is usually fire.


Long experience has taught me that ignoring recreateable bugs will always come back to bite me in the ass.

13 hours ago, lmacri said:
<div class="ipsQuote_contents ipsClearfix" data-gramm="false">
	<p>
		I doubt the CCleaner developers ever intended for users to run CCleaner Portable from the C:\Program Files\... directory
	</p>
</div>

Quite.

CCleaner Portable exists for users who would be cleaning computers from portable media, and as per the disclaimer on the download page, is only intended for advanced users who know what they are doing. Some third party download sites promote it to end-users - either so they can generate traffic by claiming a "special" version that other sites don't have, or because it is easier to put their own ad wrapper around it - both of which are rather naughty.

Since commercial use is prohibited by the terms of service (CCleaner Technician Edition is the one intended for commercial use in this fashion), the primary remaining use case for CCleaner Portable would be a tech-savvy home user armed with a USB stick doing a quick one-off clean-up of a friend's computer rather than just installing the free version of CCleaner on it. This is a bit niche. As such, other than removing functions such as Performance Optimiser (which won't run in a portable setup), we don't invest a huge amount of time making custom tweaks to the portable edition.

I install it on my workstation for my own use because I don't want the installed version with Optimizer, etc.

I have no desire to plug in a USB stick when I want to run it.


I will move it to User\Public instead and avoid the crash.




You still have a bug with a nasty crash from an unhandled exception that is permissions-related.

22 hours ago, Dave CCleaner said:
<div class="ipsQuote_contents">
	<p>
		Quite. 
	</p>

	<p>
		CCleaner Portable exists for users who would be cleaning computers from portable media, and as per the disclaimer on the download page, is only intended for advanced users who know what they are doing. Some third party download sites promote it to end-users - either so they can generate traffic by claiming a "special" version that other sites don't have, or because it is easier to put their own ad wrapper around it - both of which are rather naughty.
	</p>

	<p>
		Since commercial use is prohibited by the terms of service (CCleaner Technician Edition is the one intended for commercial use in this fashion), the primary remaining use case for CCleaner Portable would be a tech-savvy home user armed with a USB stick doing a quick one-off clean-up of a friend's computer rather than just installing the free version of CCleaner on it.  This is a bit niche.  As such, other than removing functions such as Performance Optimiser (which won't run in a portable setup), we don't invest a huge amount of time making custom tweaks to the portable edition.
	</p>
</div>

Hi Dave, can you look into the issue that I reported for this threat originally which is related to the uncleaned cookies data?

Hi bgavin:

Just an FYI that there is another user reporting in StillTrying's thread CCleaner v6.06.10144 (16 Nov 2022) Will Not Run that they are unable to run CCleaner Portable v6.06 from their hard drive but that it will run from a removable USB thumb drive.

-------------

64-bit Win 10 Pro v21H2 build 19044.2251 * Firefox v107.0.0 * Microsoft Defender v4.18.2210.6-1.1.19800.4 * Malwarebytes Premium v4.5.18.226-1.0.1823 * Macrium Reflect Free v8.0.7090 * CCleaner Free Portable v6.06.10144

Dell Inspiron 15 5584, Intel i5-8265U CPU, 8 GB RAM, 256 GB Toshiba KBG40ZNS256G NVMe SSD, Intel UHD Graphics 620</span>

I solved my issue by having my script issue an ICACLS command to C:\Program Files\Portable\

icacls "C:\Program Files\Portable" /grant *S-1-1-0:(OI)(CI)F /T /Q // SID is SECURITY_WORLD_SID_AUTHORITY (all users)

I am the only one who uses this directory, and the subs beneath it for my various utilities.