How To Clean Custom Opera Installations

...and my knowledge of adjusting Winapp2.ini is only enough to be dangerous ! !

I can surely relate to that :lol: . Since I made a backup copy of the original winapp2.ini file, and I know from "reverse engineering" my default Opera install that the last file-folder in each FileKey is definitely what I want cleaned, I'll just keep playing with the syntax of every FileKey under every category (except "Sessions"; I'm batting .125 B) ) in the event that I get lucky. Who knows?

OK, I'm now batting .594. It seems that my syntax was off on quite a few FileKeys; too many forward slashes, not enough pipes. Here are the edited embedded cleaning options as they presently stand:

[Opera - Internet Cache*]
ID=2006
LangSecRef=3028
LangRef=3161
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63\cache|*.*|RECURSE
FileKey2=%AppData%\Opera\10.63\opcache|*.*|RECURSE
FileKey3=%AppData%\Opera\10.63\icons|*.*|RECURSE

[Opera - Internet History*]
ID=2007
LangSecRef=3028
LangRef=3162
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63\vps|RECURSE
FileKey2=%AppData%\Opera\10.63|download.dat
FileKey3=%AppData%\Opera\10.63|global_history.dat
FileKey4=%AppData%\Opera\10.63|vlink4.dat

[Opera - Cookies*]
ID=2008
LangSecRef=3028
LangRef=3102
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63|cookies4.dat

[Opera - Recently Typed URLs*]
ID=2228
LangSecRef=3028
LangRef=3104
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63|typed_history.xml

[Opera - Last Download Location*]
ID=2223
LangSecRef=3028
LangRef=3108
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
SpecialKey1=N_OPERA_LAST_DOWNLOAD_LOCATION

[Opera - Session*]
ID=2225
LangSecRef=3028
LangRef=3167
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63\sessions|.

[Opera - Website Icons*]
ID=2149
LangSecRef=3028
LangRef=3166
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63\icons|.
FileKey2=%AppData%\Opera\10.63\icons\cache|.

[Opera - Saved Passwords*]
ID=2182
LangSecRef=3028
LangRef=3109
WarningRef=3202
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63|wand.dat

and here's a screen shot of a detailed CCleaner analysis of my custom install (which appears as Safari so as to minimize confusion with the default Opera install in the CCleaner interface):

post-34316-0-63771000-1309173769_thumb.jpg

Interestingly, all of the successfully populated files and folders--part of Internet History, Cookies, Recently Typed URLs, Session, and Saved Passwords--are located in "...AppData\Roaming\Opera\10.63" and all of the unsuccessfully populated files and folders--Internet Cache, part of Internet History, and Website Icons--are located in "...AppData\Local\Opera\10.63". Please, does anybody know why this is true?

Perhaps that is how Opera does things.

I find that just the one Firefox installation has 4 different profiles.

My personal profile Users\Alan has two, local and roaming.

The general profile Users\user has another two

After some more time spent staring at my laptop screen I lucked into the knowledge that, while "%AppData%\..." covers roaming AppData, "%LocalAppData%\..." covers, well, local AppData. Yep, seems pretty obvious now. That discovery plus a double-checking of my edited embedded cleaning options against the default Opera install--I found a couple of mistakes and corrected them--has left this for a final version:

[Opera Custom - Internet Cache*]
ID=2006
LangSecRef=3028
LangRef=3161
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%LocalAppData%\Opera\10.63\cache|*.*|RECURSE
FileKey2=%LocalAppData%\Opera\10.63\opcache|*.*|RECURSE

[Opera Custom - Internet History*]
ID=2007
LangSecRef=3028
LangRef=3162
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%LocalAppData%\Opera\10.63\vps|.|RECURSE
FileKey2=%AppData%\Opera\10.63|download.dat
FileKey3=%AppData%\Opera\10.63|global_history.dat
FileKey4=%AppData%\Opera\10.63|vlink4.dat

[Opera Custom - Cookies*]
ID=2008
LangSecRef=3028
LangRef=3102
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63|cookies4.dat

[Opera Custom - Recently Typed URLs*]
ID=2228
LangSecRef=3028
LangRef=3104
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63|typed_history.xml

[Opera Custom - Last Download Location*]
ID=2223
LangSecRef=3028
LangRef=3108
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
SpecialKey1=N_OPERA_LAST_DOWNLOAD_LOCATION

[Opera Custom - Session*]
ID=2225
LangSecRef=3028
LangRef=3167
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63\sessions|autosave.win
FileKey2=%AppData%\Opera\10.63\sessions|autosave.win.bak

[Opera Custom - Website Icons*]
ID=2149
LangSecRef=3028
LangRef=3166
Default=True
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%LocalAppData%\Opera\10.63\icons|.

[Opera Custom - Saved Passwords*]
ID=2182
LangSecRef=3028
LangRef=3109
WarningRef=3202
DetectFile=%ProgramFiles%\10.63\Opera.exe
FileKey1=%AppData%\Opera\10.63|wand.dat

[Opera Custom More*]
LangSecRef=3028
DetectFile=%ProgramFiles%\10.63\Opera.exe
Default=False
FileKey1=%LocalAppData%\Opera\10.63\icons|.|REMOVESELF
FileKey2=%LocalAppData%\Opera\10.63\thumbnails|.|REMOVESELF
FileKey3=%LocalAppData%\Opera\10.63\vps|.|REMOVESELF
FileKey4=%LocalAppData%\Opera\10.63\temporary_downloads|.|
REMOVESELF

To use this for any install of Opera (although there would be no point in using it for a default install), just edit the DetectFile's and FileKey's to reflect your non-default Opera file paths. Please Note: every LangSecRef=3028 so that all the categories appear in CCleaner's interface under Safari to (for me at least) make things less confusing; if you want them to appear under Opera in CCleaner then simply change each LangSecRef to =3027. Also, I copied the category "Opera More*" from the original winapp2.ini file, renamed it "Opera Custom More*", pasted it at the end of the custom embedded cleaning options, and edited it to find my custom install of Opera and clean the same files-folders as it would in a default install. And, under the heading "Website Icons" in the default Opera install, CCleaner is able to automatically exclude bookmark icons; I was unable to emulate this so checking "Website Icons" in the custom Opera cleaning options will delete all website icons, including bookmark icons (which also happens if "Opera More*" or "Opera Custom More*" is ticked). In addition, under the heading "Cookies" in the default Opera install, CCleaner allows for manually selecting "Cookies to Keep" (in Options/Cookies); I was unable to emulate this (although I'm working on it) so checking "Cookies" in the custom Opera cleaning options will delete all cookies, including "Cookies to Keep". Finally, I never could figure out which file(s)-folders(s) CCleaner deletes in Opera by default under "Last Download Location" so that heading was never edited. Anyway, I hope that someone finds the above of use. I'm left with some questions, however, that I hope someone will answer:

1) Is it possible to use the above as a separate .ini file (winapp3.ini, maybe?) so that every time I update my winapp2.ini file I don't have to copy-and-paste the above to the updated winapp2.ini? Answered: not possible.

2) Is it possible to somehow add the list of saved cookies in my ccleaner.ini file to the above? That is, can I somehow incorporate the list of saved cookies in my ccleaner.ini file to the above without having to add them individually to Exclude? Answered: not possible, but there is a workaround (see Post #44).

3) Where can I find a list of usable ID's and LangRef's for the winapp2.ini file? That is, I would like to know exactly what the options are for "ID=xxxx" and "LangRef=xxxx" in the winapp2.ini file so that I can further customize the above. I couldn't find an answer after extensive searching; if anyone does then please send me a message. Thanks.

Thank you very much.

Is it possible to use the above as a separate .ini file (winapp3.ini, maybe?) so that every time I update my winapp2.ini file I don't have to copy-and-paste the above to the updated winapp2.ini?

A fraid knot, but you can do what I do and compare the new Winapp2 with your old one via a Diff program such as WinMerge

Nergal: thank you for answering one of my questions, and thank you very much for recommending WinMerge :) . I just finished downloading the portable version and setting it up so that as soon as I update my winapp2.ini file (with CCEnhancer) I can open WinMerge, press a couple of buttons, and have an updated winapp2.ini file with the custom embedded cleaning options copied to it. The next best thing to a winapp3.ini, I reckon.

yup the portable apps version is the on e I use too.

I've not tried making patches with it (I use a diff program on Linux that makes great patches though)

What's a patch, Nergal? Also, since you're a Moderator, would it be bad form for me to post my 2 unanswered questions in a new thread? Thanks.

Any chance we can sticky this, in a similar manner to the Chrome version of this thread? It's highly informative for Opera users.

Any chance we can sticky this, in a similar manner to the Chrome version of this thread? It's highly informative for Opera users.

I suggest the title would merit changing to something like

How to Clean Custom Installations of two versions of the same Application (e.g. Opera)

I think this topic has covered techniques that are not restricted to Opera 10.63 and 11.11.

There could be other CCleaner users who do not use Opera but have a similarly need with alternative browsers,

or even with non-browser applications.

I never switch to a later version of CCleaner until I have inspected the differences between the analysis results of the previous,

and most times any new features apply to products I do not have so I stick with the Old,

Sorry to pester, but is there a respectful way to have my final 2 questions answered (I think that they were lost in the shuffle)?

2) Is it possible to somehow add the list of saved cookies in my ccleaner.ini file to the above? That is, can I somehow incorporate 
the list of saved cookies in my ccleaner.ini file to the above without having to add them individually to Options/Exclude?
  1. Where can I find a list of usable ID’s and LangRef’s for the winapp2.ini file? That is, I would like to know exactly what the
    options are for “ID=xxxx” and “LangRef=xxxx” in the winapp2.ini file so that I can further customize the above.

I realize that they're technically off topic, so I'm not sure if I should start a new thread. Regardless, many thanks to all the kind people who helped me solve my original dilemma; I really appreciate your help :) .

Why do you want to exclude Cookies in the WinApp2.ini file ?

I could be wrong but it seems to me not feasible.

As standard without the WinApp2.ini you have these options (anongst others)

EXCLUDE, which can specify files,or folders, or Registry items, but NOT cookies;

INCLUDE, which can specify files,or folders, but NOT Registry items or cookies;

COOKIES, which on the left shows some cookies that are "ready to go", and on the right are Cookies to Keep.

I doubt that WinApp2.ini would add an exclude cookie capability that native CCleaner does not support.

Is not Cookies to keep a very close alternative to "Cookies to Exclude from cleaning"

Does that not meet your needs ?

Cookies to keep includes cookies from whatever, i.e.

Abominable I.E. cookies

Abominable Adobe Flash Cookies

Chrome cookie - I could start a flame war here ! !

Firefox Cookies

and I guess any Opera cookie that has been detected.

I would suggest that the hard part with a custom Opera is getting the cookies detected in non-standard places,

but once they are detected the Cookies to Keep should automatically protect all you want to protect

I cannot advise you on "ID=xxxx" and "LangRef=xxxx",

other than to point you at the top 30 lines of winapp2.ini which refers to

; LangSecRef

; 3021 = Applications

; 3022 = Internet

; 3023 = Multimedia

; 3024 = Utilities

; 3025 = Windows

; 3026 = Firefox/Mozilla

; 3027 = Opera

; 3028 = Safari

You could manually add the location of the cookies in a manner such as

ExcludeKey1=FILE|Path to cookie

and so on for all of the cookies you wish to keep, then delete all other cookies in the folder with a |*.*

Alan_B: thanks for your reply. I did notice the list of "LangSecRef" in the winapp2.ini file but was hoping for a list of "ID=xxxx" and "LangRef=xxxx" so that I could further customize my custom entries. I Googled all word combinations that I could imagine but came up with no useful information, although I image it exists somewhere. I'll keep trying. As for the cookies, I think that I wasn't lucid enough in my original question. While I'm easily able to keep the cookies of my choice (sites where I log in, etc.) in my default Opera install by going to Options/Cookies in CCleaner and selecting accordingly, when using your earlier advice to find exactly which files-folders CCleaner deletes I discovered that, unlike the other categories, viewing the detailed results of the default Opera install's "Cookies" analysis doesn't show a file path (see attachment). Thus, I was forced to settle for deleting the entire cookies file, "C:\Users\Me\AppData\Roaming\Opera\10.63\cookies4.dat", in my custom Opera install, which unfortunately means that even the cookies on my "Cookies to Keep" list are deleted. I did, however, notice that the ccleaner.ini file has a list "CookiesToSave=aaaa.com|bbbb.org|cccc.xxx|..." and was wondering if I could somehow incorporate it into my custom winapp2.ini "Cookies" entry so that the cookies of my choice aren't deleted in my custom Opera install. Basically, I was able to figure out how to exclude-include files within a folder while creating my custom winapp2.ini file, but I can't figure out how to exclude-include specific bits of a file, in this case the cookies4.dat file. Any help would be much appreciated.

post-34316-0-95819000-1309673273_thumb.jpg

Wow, Winapp2.ini, you must read minds, as you were answering my question while I was trying to ask it more clearly :lol: . After reading your reply I understand what you typed but I can't find any individual cookies, all I see is cookies4.dat.

Oh :( That is unfortunate. I do not know how Opera handles its cookies, but it seems like they're all in that one file, if I had to guess.

I tried to open cookies4.dat with Notepad but this is the result (see attachment). Also, while you're about, Winapp2.ini, do you happen to know where I could find a list of "ID=xxxx" and "LangRef=xxxx" options? Thanks again for all your help.

post-34316-0-90195100-1309677066_thumb.jpg

I tried to open cookies4.dat with Notepad but this is the result (see attachment):

I have far less experience with Windows 7 than XP,

but I remember that Wordpad was generally better if Notepad gave rectangular blocks in the text.

This especially applied to the various "change.log" files within Restore Points

(I go where angels fear to tread ! ! !)

Thanks for the idea, Alan_B, but the results (see attachment) are similar :angry: .

post-34316-0-83710500-1309678090_thumb.jpg

Googling for answers I bumped into this in Opera's knowledge base (emphasis is mine):

Opera supports the exact same format for setting cookies as Internet Explorer and Mozilla Firefox. This means that Opera will be able to accept all cookies that work with these browsers. Cookies are stored in the file named cookies4.dat located in the user's Opera profile folder (on Linux known as .opera, on Macintosh called Opera Preferences). It is not possible to edit the file cookies4.dat by hand in order to remove unwanted cookies from your hard drive, but you can use Opera's server manager (go to Tools > Preferences > Advanced > Cookies, click "Manage cookies").

Web developers should note that Opera does not store cookies sent from files loaded with the "file://" protocol, that is, local files on your hard disk. The reason is that such cookies are considered a privacy risk.

I take this to mean that there's no way I can add a "Cookies to Keep" list to the custom Opera cleaning options, unless someone knows differently. Now to figure out "ID=xxxx" and "LangRef=xxxx" options...