Error with latest Winapp2.ini file

Forum tags: 

In the newest version of the winapp2.ini v1.0.120113 from I get these two errors

Traceback (most recent call last):
File "bleachbit\Winapp.pyo", line 93, in __init__
File "bleachbit\Winapp.pyo", line 104, in handle_section
File "bleachbit\Windows.pyo", line 223, in detect_registry_key
File "bleachbit\Windows.pyo", line 391, in split_registry_key
RuntimeError: Invalid Windows registry hive '%Doc'

Traceback (most recent call last):
File "bleachbit\Worker.pyo", line 88, in execute
File "bleachbit\Command.pyo", line 278, in execute
File "bleachbit\Windows.pyo", line 135, in delete_registry_value
File "bleachbit\Windows.pyo", line 391, in split_registry_key
RuntimeError: Invalid Windows registry hive 'HKU\'

Question is it a winapp2.ini error or does Bleachbit not recognize 'HKU\' and %Documents% entries in a winapp2.ini file?


HKU is definitely a bug in Winapp2.ini. By using BleachBit, I have reported several to the Winapp2.ini maintainers, though some bugs remain, and new bugs are added.

The %Documents% variable looks to be new and undocumented.

For the short term, you can delete those lines or cleaners, or you can use the winapp2.ini provided through the BleachBit update system. It is updated about once a month, and I try to check for these kinds of errors. Also, I will check into recognizing %Documents%, and if these errors cause BleachBit to not start up (I think they don't?), I'll make sure that does not happen.

Andrew, lead developer

Doesn't cause any start up issues, Just the error log popup on close.
I thought for a second it was a mistake and was supposed to be %appdata% but after some researching of the games they added to the winapp2.ini the %Documents% point to
in winXP: "c:\Documents and Settings\"user name"\My Documents"
and in Vista/win7 "c:\Users\"user name"\Documents\"

Didn't need any of the entries causing errors so I removed them.

I added %Documents% support to SVN which will be BleachBit 0.9.2---watch for the beta.

It turns out this error is caused a bug in this section
[Batman Arkham Asylum*]
Detect=%Documents%\Eidos\Batman Arkham Asylum\
FileKey1=%Documents%\Eidos\Batman Arkham Asylum\BmGame|*.log|RECURSE

The key Detect= should be DetectFile= because Detect= always refers to a registry key. CCleaner apparently has very quiet error handling, so it's easy for errors to go undetected in winapp2.ini.

Andrew, lead developer

I passed this along to winapp topic on the piriform forum.

Got it, will be fixed in the next version!

Thanks :)

Edit: HKU is for HKEY_USERS and is handled that way by CCleaner

Yes, my mistake! I fixed this for the next release (BleachBit 0.9.2 beta). Now BleachBit supports HKCR, HKCU, HKLM, and HKU.

Andrew, lead developer

Please try the fix in BleachBit 0.9.2 beta

Andrew, lead developer

Works without error. Thanks :)