Jump to content

Windows 7 and CCleaner


tuttle

Recommended Posts

Windows 7 64-bit

CCleaner 3.12 Slim

 

Installed CCleaner to default location, which is Program Files, and set it to save settings to CCleaner.ini file.

 

CCleaner.ini is created in \Program Files\ directory. Why is this? My understanding is that writable files, such as a settings file that will change, should not be written to \Program Files\ directory. There are issues around whether they are writable/editable or not, because Windows 7 protects things in that folder.

 

1. Can someone please explain how this works with CCleaner in Windows 7 ?

 

2. When logged in as Administrator, to run CCleaner I must respond to User Account Control prompt and accept elevation. Yet, when logged in as as standard user, there is no UAC prompt. This seems the reverse of expected, could someone please explain?

 

When logged in as Administrator, I set a cookie to be saved by CCleaner. Later when I logged in as a standard user and ran CCleaner, that cookie was still set to be saved.

 

3. Is CCleaner intended NOT to have per-user settings? Are only the Administrator settings retained?

 

4. Should there not at least be per-user saving of cookies? Different users (user accounts) will likely have different web sites on which they wish to retain cookies for logins, etc.

 

5. If CCleaner only saves settings to .ini file in Program Files directory, rather than to Appdata per user, is it possible to change that location? It might be preferable to save it on my Data partition where it will be saved in case Windows partition ever needs to be restored.

 

Thanks

Link to comment
Share on other sites

2. When logged in as Administrator, to run CCleaner I must respond to User Account Control prompt and accept elevation. Yet, when logged in as as standard user, there is no UAC prompt. This seems the reverse of expected, could someone please explain?

Under User control CC will (should) not meddle with the system,

U.A.C. would (should) not be granted for system endangering things such as cleaning Windows Log files, and Prefetch files,

and Restore Point purging are out of bounds.

U.A.C. is NOT appropriate for System SAFE operations such as cleaning the Browser cache in the User's profile.

I guess CCleaner recognises User status and knows it will not hit U.A.C. restrictions so does not request authority.

 

I guess CC requests authority when an Admin runs it to avoid constant system nagging for each privileged action.

 

When logged in as Administrator, I set a cookie to be saved by CCleaner. Later when I logged in as a standard user and ran CCleaner, that cookie was still set to be saved.

 

3. Is CCleaner intended NOT to have per-user settings? Are only the Administrator settings retained?

 

4. Should there not at least be per-user saving of cookies? Different users (user accounts) will likely have different web sites on which they wish to retain cookies for logins, etc.

Had you chosen a standard installation then each user would be independent because all settings / cookies / etc are held in the individual users registry hive

(HKCU\.... or there-about.)

You chose to save settings to the INI file which is held in the same folder as CCleaner.exe,

and WIndows itself is likely to forbid any User changes within Program Files.

 

You can always uncheck Save Settings to INI if you wish.

 

5. If CCleaner only saves settings to .ini file in Program Files directory, rather than to Appdata per user, is it possible to change that location? It might be preferable to save it on my Data partition where it will be saved in case Windows partition ever needs to be restored.

I always choose Portable software and install on a separate partition so Windows can die by itself and all my applications remain intact.

 

I have a Public Desktop short-cut to Clean.Bat

My batch file lives in the folder with CCleaner.exe,

and when it runs it copy/replaces CCleaner.ini with either Alan.ini or Default.ini,

determined by whether %USERNAME%==Alan

 

I configured CC for safe use by my daughter and closed CC to define a super-safe CCleaner.ini,

and I renamed that as Default.ini so she can clean her User profile and little else.

 

I similarly created a super-strength CCleaner.ini which is renamed as Alan.ini.

Link to comment
Share on other sites

The .ini file is not hardcoded to C:\

If CCleaner is installed to C:, which is the normal location for software installs, the .ini file goes in the CCleaner folder in the Program Files folder. There seems to be no way to change the location of the .ini file other than to change the location of the install. That's bad behaviour not in keeping with Windows developer standards.

 

 

Had you chosen a standard installation then each user would be independent because all settings / cookies / etc are held in the individual users registry hive

(HKCU\.... or there-about.)

You chose to save settings to the INI file which is held in the same folder as CCleaner.exe,

The INI file is a good arrangement, as it keeps entries out of registry and enables INI files to be shared and copied to other installations.

 

WIndows itself is likely to forbid any User changes within Program Files.
CCleaner should not place the .ini in that folder, as that's bad behaviour. Windows developer standards state that writeable files should not be in Programs Files directory. Programs Files includes special protection for application files.

 

You can always uncheck Save Settings to INI if you wish.

But then I'd lose the benefit of having all my settings in one place which I can include in backups and copy to other installations. The INI file is a sensible setup, but CCleaner's location of it is not.

 

I always choose Portable software and install on a separate partition so Windows can die by itself and all my applications remain intact.
Windows 7 provides many considerations and protections for applications installed in Programs Files directory. There's a good reason why applications are meant to install there. Installing elsewhere, because an application doesn't follow sensible standards, loses the value of that directory for that application.

 

I have a Public Desktop short-cut to Clean.Bat

My batch file lives in the folder with CCleaner.exe,

and when it runs it copy/replaces CCleaner.ini with either Alan.ini or Default.ini,

determined by whether %USERNAME%==Alan

 

I configured CC for safe use by my daughter and closed CC to define a super-safe CCleaner.ini,

and I renamed that as Default.ini so she can clean her User profile and little else.

 

I similarly created a super-strength CCleaner.ini which is renamed as Alan.ini.

That's an interesting approach. Have you posted instructions somewhere that I can look at?

 

From these replies, it sounds as though there is not a way to tell CCleaner to place its INI file somewhere other than Program Files, if CCleaner was installed to the sensible default location of Program Files. CCleaner should stop writing INI to Program Files directory which has been advised to be non-writeable since at least Windows XP or NT. It's only in Vista and Win7 that the standard gained more enforcement, as an INI placed in Program Files may not be able to be edited/updated.

Link to comment
Share on other sites

Yes.

 

1. Install CCleaner.EXE to the folder you wish CCleaner.INI automatically live in.

 

or if you have the time and patience (which I lack)

 

2. Move the INI wherever you want and use a Reparse Point to bridge the gap - Microsoft publish this information somewhere.

Link to comment
Share on other sites

Ah, okay, so no way within CCleaner to do this, while still having CCleaner.exe install to Program Files?

 

This really should be fixed by Piriform. Executables should, of course, be installed to Program Files because of the protections designed into that directory. But, writable files are not to go in that directory. This has been the case since at least WinXP, so developers are well aware of this.

 

CCleaner should by default locate the .ini file in ProgramData, or in the user's directory, and even better to provide an option of where it should go.

 

Thanks for the reply.

Link to comment
Share on other sites

I totally disagree with you.

 

It was your choice to Save Settings to INI.

 

So far as I am aware Piriform PERFECTLY meet your requirement to meet "Windows developer standards" if you allow a normal standard install.

 

Piriform also PERFECTLY meets the requirements of discerning users who detest being slaves to the Registry and its malfunctions and require PORTABILITY.

 

You may walk out of step with both the normal users who accept a standard installation and the other group who prefer and use portable tools,

but please do not expect Piriform to change their perfectly acceptable product and force us all to walk in step with you.

 

For a normal install there is no CCleaner,ini,

and it is only available as a user option,

typically for purposes such as changing the configuration without having to edit the registry.

e.g. Years ago I edited it so that My Firefox cache was no longer cleaned by my specifically browsed Profile starting at "C:\Documents and Settings\...."

but by using %APPDATA%\...."

The result was that the Firefox Caches in other users profiles were there-after also cleaned.

That was good for me and my family.

 

You want individual cleaning per user - that is what you get if you do not interfere with the settings of a normal install.

Link to comment
Share on other sites

We all know that use of the .ini file is a more convenient option. It allows easy transferrance of user settings and cookie save lists to other computers and to portable installations on USB flash drives. There's no reason that the .ini could not be installed elsewhere, in accordance with Windows standards as so many other portable apps do.

 

The .ini file could still be portable, it just should not go in Program Files.

 

It's not about being in step with me. Not saving writable files to Program Files directory has been a well known Windows standard at least since WinXP, and is also the case with Unix.

Link to comment
Share on other sites

You can choose strict compliance to Windows standard,

or you can choose Convenience.

It really is your choice and you have to stick with the consequences of whatever you choose.

 

I see no point in continuing with this topic

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.