Each time I run CCleaner, the history of Anti-Virus Grisoft (AVG) is removed. AVG then thinks it hasn't run before and does an initial scan which takes hours. How can I set CCleaner so it does not remove the AVG History?
You can uncheck AVG (or the applications tab)
Here is what is cleaned by ccleaner with the AVG Checkmark (I'm giving you all the version because you don't state what version of AVG you use
[Grisoft AVG 7.0] ID=2128 LangSecRef=3024 Detect=HKLM\SOFTWARE\Grisoft\Avg7 Default=True FileKey1=%commonappdata%\Grisoft\Avg7Data|*.log FileKey2=%commonappdata%\Grisoft\Avg7Data\upd7bin|*.* FileKey3=%commonappdata%\Grisoft\Avg7Data\$history|*.* FileKey4=%commonappdata%\Grisoft\Avg7Data\avg7upd|*.log FileKey5=%windir%\All Users\Application Data\Grisoft\Avg7Data\upd7bin|*.* FileKey6=%windir%\All Users\Application Data\Grisoft\Avg7Data\avg7upd|$history FileKey7=%windir%\All Users\Application Data\Grisoft\Avg7Data\avg7upd|*.log FileKey8=%windir%\All Users\Application Data\Grisoft\Avg7Data|*.log FileKey9=%windir%\Application Data\AVG7\Log|*.log[AVG AntiVirus 8.0]
ID=2141
LangSecRef=3024
Detect=HKLM\SOFTWARE\AVG\Avg8
Default=True
FileKey1=%allusersprofile%\Application Data\avg8\Log|.log
FileKey2=%allusersprofile%\Application Data\avg8\scanlogs|.log
FileKey3=%allusersprofile%\Application Data\avg8\Log|.xml
FileKey4=%allusersprofile%\Application Data\avg8\update\backup|.*
FileKey5=%allusersprofile%\Application Data\avg8\Emc\Log|*.log[AVG AntiVirus 9.0]
ID=2145
LangSecRef=3024
Detect=HKLM\SOFTWARE\AVG\Avg9
Default=True
FileKey1=%allusersprofile%\Application Data\avg9\Log|.log
FileKey2=%allusersprofile%\Application Data\avg9\scanlogs|.log
FileKey3=%allusersprofile%\Application Data\avg9\Log|.xml
FileKey4=%allusersprofile%\Application Data\avg9\update\backup|.*
FileKey5=%allusersprofile%\Application Data\avg9\Emc\Log|*.log[AVG AntiVirus 10.0]
ID=2170
LangSecRef=3024
Detect=HKLM\SOFTWARE\AVG\Avg10
Default=True
FileKey1=%allusersprofile%\Application Data\avg10\Log|.log
FileKey2=%allusersprofile%\Application Data\avg10\scanlogs|.log
FileKey3=%allusersprofile%\Application Data\avg10\Log|.xml
FileKey4=%allusersprofile%\Application Data\avg10\update\backup|.*
FileKey5=%allusersprofile%\Application Data\avg10\Emc\Log|*.log
you could experiment with the exclude section of the ccleaner options and see which of these cleans is causing the issue, or as I said just uncheck AVG in the applications tab.
You're probably best to untick the AVG cleaner, and exclude the logs folder that way should you ever accidentally enable it again cleaning the logs will be impossible.