CONCISE PROOF OF CONCEPT Portable CCleaner is only semi-portable.
I created the folder E:\Test\CC\V1\ and unzipped into this 3 items from ccsetup402.zip
24/05/2013 10:03 6,154,008 CCleaner64.exe
08/01/2013 07:04 5,535 License.txt
26/11/2009 14:02 10 portable.dat
I copy/created duplicates of E:\Test\CC\V1\ as
E:\Test\CC\V2\
E:\Test\CC\V3\
I launch E:\Test\CC\V2\CCleaner64.exe
click NO for cookies to keep
Right click the Windows sub-heading "Internet Explorer" and select Analyze
Right click "ANALYSIS COMPLETE - (0.113 secs)" and select "Save to text file..."
Replace destination E:\Test\CC\V1-123456789ABCD\123456789ABCDEF with E:\Test\CC\V2
and click "Save" and log.txt appears under E:\Test\CC\V2
I close CCleaner64 and ccleaner.ini is updated with window coordinates
I launch E:\Test\CC\V3\CCleaner64.exe
click NO for cookies to keep
Right click the Windows sub-heading "Internet Explorer" and select Analyze
Right click "ANALYSIS COMPLETE - (0.097 secs)" and select "Save to text file..."
Replace destination E:\Test\CC\V2 with E:\Test\CC\V3
and click "Save" and log.txt appears under E:\Test\CC\V3
I close CCleaner64 and ccleaner.ini is updated with window coordinates
I launch E:\Test\CC\V2\CCleaner64.exe
Right click the Windows sub-heading "Internet Explorer" and select Analyze
Right click "ANALYSIS COMPLETE ..." and select "Save to text file..."
The correct destination E:\Test\CC\V2 is forgotten - destroyed by previous Windows environment
Replace destination E:\Test\CC\V3 with E:\Test\CC\V2
and change output from log.txt to log2.txt and click "Save" and log.txt appears under E:\Test\CC\V2
I close CCleaner64 and ccleaner.ini is updated with window coordinates
I again launch E:\Test\CC\V2\CCleaner64.exe and find that, as expected "Save to Text" now defaults to using E:\Test\CC\V2\
END OF CONCISE PROOF OF CONCEPT
====================================================================================
SUPPLEMENTARY INFORMATION :-
The above proves that Portable CCleaner does NOT preserve the default in its own INI file,
but it uses something in the Windows Environment, possibly in the registry.
I copy/created a duplicates of E:\Test\CC\V1\ as E:\Test\CC\V1-123456789ABCD\
I created a new folder E:\Test\CC\V1-123456789ABCD\123456789ABCDEF\
After disconnecting the router and disabling my entire Comodo security suite to avoid it filling BAGS OF MUI etc.
I used Regshot to monitor the operation of E:\Test\CC\V1-123456789ABCD\CCleaner64.exe as it launched and saved text to
E:\Test\CC\V1-123456789ABCD\123456789ABCDEF\
and then I closed CCleaner and took the second Regshot and compared.
Regshot observed :-
----------------------------------
Keys added:4
----------------------------------
HKU\S-1-5-21-4077350907-178761674-415728870-1000\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\1433\ComDlg
HKU\S-1-5-21-4077350907-178761674-415728870-1000\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\1433\ComDlg\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}
HKU\S-1-5-21-4077350907-178761674-415728870-1000_Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\1433\ComDlg
HKU\S-1-5-21-4077350907-178761674-415728870-1000_Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\1433\ComDlg\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}
and
----------------------------------
Files [attributes?] modified:5
----------------------------------
C:\Users\Alan\AppData\Local\Microsoft\Windows\UsrClass.dat
C:\Users\Alan\AppData\Local\Microsoft\Windows\UsrClass.dat.LOG1
C:\Users\Alan\AppData\Roaming\Microsoft\Windows\Recent\CustomDestinations\fb88c7754c3d58a4.customDestinations-ms
C:\Users\Alan\NTUSER.DAT
C:\Users\Alan\ntuser.dat.LOG1
plus tons of registry values that changed.
I copied fb88c7754c3d58a4.customDestinations-ms as fb88c7754c3d58a4 - Copy.customDestinations-ms.txt
It holds very many relevant fragments, such as :-
C C l e a n e r 6 4 . e x e
E_SAM_E E:\Test\CC\V1-123456789ABCD\CCleaner64.exe / A U T O * E : \ T e s t \ C C \ V 1 - 1 2 3 4 5 6 7 8 9 A B C D \ C C l e a n e r 6 4 . e x e q
R u n C C l e a n e r
E_SAM_E E:\Test\CC\V1-123456789ABCD\CCleaner64.exe / O P T I O N S * E : \ T e s t \ C C \ V 1 - 1 2 3 4 5 6 7 8 9 A B C D \ C C l e a n e r 6 4 . e x e e
I saw no evidence of any instance of either "ABCDEF" or "A B C D E F", so this file probably does not hold the log.txt destination, unless ROT13 encryption is used.
Nirsoft Regscanner searched for 123456789ABCDEF and found :-
28/05/2013 12:54:34 1 REG_BINARY 102 HKCR\Local Settings\Software\Microsoft\Windows\Shell\BagMRU\0\3\3\5\7
28/05/2013 12:54:34 1 REG_BINARY 102 HKU\S-1-5-21-4077350907-178761674-415728870-1000\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU\0\3\3\5\7
28/05/2013 12:54:34 1 REG_BINARY 102 HKU\S-1-5-21-4077350907-178761674-415728870-1000_Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU\0\3\3\5\7
28/05/2013 13:04:13 0 REG_BINARY 421 HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRU
28/05/2013 13:04:13 0 REG_BINARY 421 HKU\S-1-5-21-4077350907-178761674-415728870-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedPidlMRU
28/05/2013 13:04:13 15 REG_BINARY 473 HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU\txt
28/05/2013 13:04:13 15 REG_BINARY 473 HKU\S-1-5-21-4077350907-178761674-415728870-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU\txt
28/05/2013 13:04:13 17 REG_BINARY 473 HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU\*
28/05/2013 13:04:13 17 REG_BINARY 473 HKU\S-1-5-21-4077350907-178761674-415728870-1000\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\OpenSavePidlMRU\*
6 different ...\\ComDlg32\... registry keys hold values that record the log.txt destination,
and if I manually change the registy key contents I may prove this is the key that controls the Save to Text destination - or I might have Windows collapse about my knees.
They are NOT registry keys that are owned by Piriform or CCleaner,
but Windows may have linkages that relate ...\Recent\CustomDestinations\... with registry keys ...\ComDlg32\...
It should be noted that :-
The first three keys were created at 28/05/2013 12:54:34 when I used Windows Explorer to create folder 123456789ABCDEF
The last six keys were created at 28/05/2013 13:04:13 when CCleaner was closed and log.txt was created with time stamp 28 May 2013, 13:04:13
E:\Test\CC\V1-123456789ABCD\ccleaner.ini was created at 28 May 2013, 12:59:29 and modified when CCleaner closed at 28 May 2013, 13:04:23
Regards
Alan