Avast settings being moved to registry in 20.7

Starting from 20.7 (previously mentioned here), Avast now stores most of its configuration settings (previously in avast5.ini / settings.ini) in registry. This is due to performance considerations of the ever increasing amount of settings we store and is a necessary optimization to keep things running smooth.

So in 20.7 you will no longer find avast5.ini and most of other ini files in Avast’s Program Data folder; the new home for them is in Windows Registry at HKEY_LOCAL_MACHINE\SOFTWARE\AVAST Software\Avast\properties. You can perform modifications using Windows Registry Editor or prepare .reg files to perform the modifications automatically; these can then be shared with other users as well. Note that Self-Defense must be turned off to perform the modifications (but you can turn it on automatically by including its SelfDefense=1 setting in the .reg file).

While this might break age-old habits, we believe this will significantly improve the performance of any settings-related tasks. INI files were comfortable to work with but they are inherently slow due to their text-encoded nature. This change enables easier automation of changes to settings - you can now send custom-tailored .reg files to other users who need your help with a more complex configuration without overwriting any of their other local settings (compared to replacing entire .ini files). The names and meaning of all setting section remain the same.

Hope it helps!

Thanks Hried…!! :slight_smile: (German translation here: https://forum.avast.com/index.php?msg=1559445)

Thanks for the explanation Hried!

Just thought of another implication of the removal/moving of the avast5.ini settings to the registry.

There used to be a number of edits that could be made in the avast5.ini, for instance delaying the check for updates.
[InetWD]
UseRAS=1
RASWaitSeconds=120
AssumeAlwaysConnected=1
AlwaysConnectedWaitSeconds=120

Now that there is no avast5.ini how could these avast5.ini hacks be achieved (if at all) when they are all in the registry ?

Nothing has really changed in this respect - the program reads the same values, just from a different location. (The code asking for those valus, e.g. UseRAS, hasn’t changed at all - just the library that actually extracts the requested values now reads them from registry, not from the INI file.)

This should be pinned.

Yes, but rather than being to be able to edit the avast5.ini in the future (as it won’t exist, or will it as a backup), that would mean trying to find it in the registry and edit that ?

Agreed

Then you need to pin every topic that has made changes.
Most users don’t know what the .ini file is and don’t really care either.

Indeed you can edit it in the registry just as it was in the .ini.
I agree going into the registry might seem daunting the first time, but there’s one more way now - you (or anyone) can export any part of the registry into a .reg file and share it with another user to apply just those selected settings and not overwriting any others. This can then be double-clicked and applied without having to have any knowledge of the .ini files or registry whatsoever (but if you do, you’ll be right at home as the .reg files are actually very similar to the .ini files).

I’ll post an example tomorrow to illustrate the ease of transition from any existing ini-based recipe.

Thanks for the clarification, I look forward to the illustration.

I don’t so much have a problem working in the registry, but many others are likely to have, but how many of those would have the need. I think the main thing for me would be knowing where in the registry these keys are located.

I suspect it wouldn’t just be one registry key ?

The properties are now represented as a tree:

https://i.ibb.co/WV17RWB/Avast-Registry.png

and its exact location is also included in my original post. You can see that each physical file now also has its tree node with the only difference of “avast5.ini” being turned to “settings”. Finally! We’ve been over version 5 for quite a few years already but this filename seemed to forever haunt us.

Now, if you were to hit export (via right-click) on the selected item, you would get this .reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\AVAST Software\Avast\properties\settings\Hns]
“FirewallProfile”=“DOMAIN”
“FirewallStatus”=“FirewallOn”
“LastConnectedTime”=“1598723310”
“LastManualScanTime”=“1594724787”
“LastPreScanTime”=“1598695275”
“LastScanTime”=“1599041317”
“NetworkType”=“administered”
“RouterChangedDelay”=“1”

You can hopefully see here the similarity with the .ini files. The most striking difference is the textual header and the prefix to [section names], effectively making [Hns] into [HKEY_LOCAL_MACHINE\SOFTWARE\AVAST Software\Avast\properties\settings\Hns]. Bar that, the key=value pairs remain the same, only quotes need to be added around values.
So your previous example would become:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\AVAST Software\Avast\properties\settings\InetWD]
“UseRAS”=“1”
“RASWaitSeconds”=“120”
“AssumeAlwaysConnected”=“1”
“AlwaysConnectedWaitSeconds”=“120”

The advantage of this file would be that it won’t overwrite any other settings except those explicitly mentioned and can be re-applied via a simple double-click. Hope it clears it up and feel free to ask about more details!

Thanks for the continued update/information on these registry/settings.

Yes, avast5.ini has been here for what seems an eternity.
I first started using Avast over 16 years ago on Avast 4.x which was in C:\Program Files\Alwil Software\Avast4\Data\avast4.ini

I don’t know if this question has been asked already (I can’t see it).

Q. Can devs confirm avastclear.exe will completely and fully clean out all Avast registry entries including these additional settings when invoked??

The last thing wanted is users potentially corrupting their registries whilst performing a seek and destroy mission for stray Avast items left behind. Particularly if in the process of doing a clean install of AV. That will not benefit either Avast or users.

Hi Hried, there is almost same set of keys on HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Avast Software\Avast too, is this a mirror or something else?

I raised that question when this decision was first introduced. It’s still a work in progress. Right now, the answer is no.

Thanks bob.
Devs need to fix avastclear.exe to work and properly clean up after an Avast install. For me that is a deterrent to update to 20.7.

Since you have knowledge of this and you are aware of its registry locations, HKEY_LOCAL_MACHINE\SOFTWARE\AVAST Software\Avast\properties.
And possibly HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Avast Software\Avast as NON mentioned.

I don’t see it as a problem when you consider how frequently you might do a clean reinstall utilising avastclear. I can’t recall the exact date I did one of those. But it was when I reverted to Avast 18.5 from 18.8 on my old XP system, so some considerable time ago.

I will try to push this to be done asap. However please note that left-over keys in registry are of no harm to users similarly to left-over files on disk. Registry is a very efficient storage and I would myself never touch any of those ‘registry cleaners’ promising vaguely defined (and likely unproven) speedups. But of course leaving anything behind is a bad practice and we’ll fix it as soon we can.