It would be a huge change, because when one is using custom install folders, CCleaner won't clean them. A good example is Steam, right now CCleaner checks for %ProgramFiles%\Steam\Steam.exe only, but it should read HKEY_CURRENT_USER\Software\Valve\Steam\SteamPath value. Supporting this for winapp2 is also a must, let's say something like this ReadValue1=HKEY_CURRENT_USER\Software\Valve\Steam\SteamPath and then storing that value in %ReadValue1% etc.
No response from anyone? C'mon guys, I'm disappointed...
Perhaps because nobody understands (as is my case here) nor has comment to make
Many software identifications, in CCleaner, are Detect (registry key) and not DetectFile
Well, English is not my native language but I didn't think there would be any problem with understanding. I don't know how can I write this simpler for anyone to understand, I even gave an example with Steam.
Right but what exactly are you asking for. The way I read it, is for ccleaner to detect programs via specific registry keys, but this already occurs in ccleaner (quite often). Feel free to attempt to answer in your native language and include with it Google's (or any other software's) translation
CCleaner mostly only checks if file exist in specific location, with Steam as example, CCleaner just checks %ProgramFiles%\Steam\Steam.exe exist, but what it should do is read location from HKEY_CURRENT_USER\Software\Valve\Steam\SteamPath. If dev team would implement that, they should also expose this for other to use in winapp2.ini, and I made example how it could be done. Here a "proper" example, taken from winapp2.ini, instead of using
[Steam Big Picture Cache*] Section=Games Detect=HKCU\Software\Valve\Steam Default=False FileKey1=%ProgramFiles%\Steam\tenfoot\config\httpcache|*.*|RECURSE FileKey2=%ProgramFiles%\Steam\tenfoot\config\images\web|*.*|RECURSE FileKey3=%LocalAppData%\VirtualStore\Program Files*\Steam\tenfoot\config\httpcache|*.*|RECURSE FileKey4=%LocalAppData%\VirtualStore\Program Files*\Steam\tenfoot\config\images\web|*.*|RECURSE
you could use
[Steam Big Picture Cache*] Section=Games Detect=HKCU\Software\Valve\Steam Default=False ReadValue1=HKCU\Software\Valve\Steam\SteamPath FileKey1=%ReadValue1%\tenfoot\config\httpcache|*.*|RECURSE FileKey2=%ReadValue1%\tenfoot\config\images\web|*.*|RECURSE FileKey3=%LocalAppData%\VirtualStore\Program Files*\Steam\tenfoot\config\httpcache|*.*|RECURSE FileKey4=%LocalAppData%\VirtualStore\Program Files*\Steam\tenfoot\config\images\web|*.*|RECURSE
And it's better if I write in english than to use Google translate
And I'm telling you, (opposed to the steam example you present) most entries are detected via the registry e.g.
[SUPERAntiSpyware (Logs) More*]LangSecRef=3024
Detect=HKCU\Software\SUPERAntiSpyware.com\SUPERAntiSpyware
Default=False
FileKey1=%CommonAppData%!SASCORE\AppLogs|.dmp;.SDB
FileKey2=%LocalAppData%\VirtualStore\ProgramData!SASCORE\AppLogs|.dmp;.SDB
FileKey3=%CommonAppData%\SUPERAntiSpyware.com\SUPERAntiSpyware\Applogs|.dmp;.SDB;*.ZIP
And I see you don't understand. I'm NOT talking about detecting IF APPLICATION EXIST. I'm talking about DETECTING APPLICATION's FOLDER
<sarcasm>Plot twist: Many programs allow you to change install path</sarcasm> <- This thread is about that situation. You install Steam to let's say D:\Steam and it doesn't matter that steam is "detected" by Detect=HKCU\Software\Valve\Steam because it won't be cleaned because CCleaner would still try to Clean folders in default location.
And your example with SuperAntiSpyware isn't good, because as you can see, all path that will be cleaned aren't in SUPErAntiSpyware's install dir. But Steam stores all it's temp files in install dir's subfolders.
[Steam Big Picture Cache*] Section=Games Detect=HKCU\Software\Valve\Steam DetectFile=%ProgramFiles%\Steam\Steam.exe
you can create your own personal entries by using the code inside winapp.ini and winapp2.ini to suit your needs
even i have my own personal entries to suit my needs
unless the dev create a way to detect custom install location, changing the entries manually will be the best
or you can use symbolic links
Especially in the case of steam; the community-based file is meant as a template you aren't really supposed to use it verbatim (though mind you I do, so not a hard rule), but instead look at the steam entry, for instance, and copy/paste/tailor-to-your-personal-useyou can create your own personal entries by using the code inside winapp.ini and winapp2.ini to suit your needs
I don't fully understand the need for %ReadValue1% to tell CCleaner where Steam is located in the registry.
%ReadValue1% is a temporary variable which will store Steam install path, so that FileKey1 can use it to clean it
However if you don't install into the default expected path where a software suggests during setup you will be out luck with CCleaner detecting and cleaning that software. Edit: Or CCleaner detecting the software if for instance in the registry but not knowing where the paths are to clean.
And this is the reason why I started this topic. To add functionality to CCleaner so that it can read that path from registry
you can create your own personal entries ...
Especially in the case of steam; the community-based file is meant as a template you aren't really supposed to use it verbatim (though mind you I do, so not a hard rule), but instead look at the steam entry, for instance, and copy/paste/tailor-to-your-personal-use
I know, I have been doing that for a long time. But it amazes me that devs are using that "stupid" way to detect Steam or perhaps any other app. It should read path from registry.
If I've understood @dexter86 correctly, the suggestion he puts forward is to have CC use a reg key to find where an application lives.
Then using the value of this key (which contains the folder name of the install path for the application), clean that folder - which may be customised and not the default location that the current DetectFile=%ProgramFiles% assumes and uses.
Instead he would like DetectFile=%CustomPath% where CustomPath was found in that reg key.
To continue to use the Steam example;
[Steam Big Picture Cache*]
Section=Games
Detect=HKCU\Software\Valve\Steam <=== this just determines if Steam is installed
DetectFile=%ProgramFiles%\Steam\Steam.exe <=== this assumes it lives in %ProgramFiles%
Dexter suggests;
[Steam Big Picture Cache*]
Section=Games
Detect=HKCU\Software\Valve\Steam <=== determine if Steam is installed
CustomPath=HKCU\Software\Valve\Steam\SteamPath <=== find where Steam was installed to
DetectFile=%CustomPath%\Steam\Steam.exe <=== clean where Steam actually lives
(apologies if I have the wrong end of the steer - admittedly I'm not a big winapp2.ini user)
If I've understood @dexter86 correctly...
You are probably first person to understand Yes, that is exactly what I'm trying to accomplish here. A note about your example, "DetectFile" is what the name suggest, used for detect if there is a file, for cleaning files it's FileKey1, FileKey2 etc. So that last line in your example should be something like this FileKey1=%CustomPath%\tenfoot\config\httpcache|*.*|RECURSE
you are correct of course, I just didn't think too hard about it.
(and to be perfectly honest, I just copied/pasted the @Andavari example - lazy I know)
[Educated guess]The reason custom path works for browsers is they use specialkey for cleaning instead of specific plain text filekey and regkey. I believe that what you are asking would require a complete and utter rewrite of ccleaner and it's way of doing most cleaning, as well as remove the ability for plain text win*2.ini files as everything would, likely, need a special key. [/educated guess]
[Opinion and questions] On top of that, loadup of ccleaner would be much longer as it would have to check custompath of each item (where would it get/store what could amount to hundreds of locations) not every program gives it's location in the same key throughout the registry do they?
Would each location be stored in ccleaner's registry/ini file. What about the portable version, a single non-existent customlocation (say from the last computer used) might break the cleaning ability.
[/o&q]
All of that said,
[Rote statement] the developers read all suggestions though rarely (read never) comment. They often implement viable and popular ones[/rs]
No "utter" rewrite of the code is necessary, just add function to detect custom dir, and use it ONLY with programs that store temp files in install dir (and it's subdir). And first, detecting custom program location would only "initiate" if DetectKey would pass and ONLY if that program stores some temp files in it's subdirs So your example with browser, this doesn't apply because browsers store their temp files in %AppData% or %LocalAppData%. This custom location would only be stored in memory.
And reading a registry key and checking if that location exist is very fast. Of course it would probably be somehow slower to start with winapp2, but it would finally detect & clean many apps that are not installed in Program Files