If you get the error in the title, you have to install the neccessary Visual C++ redistributable packages.
In Avast’s case, this means Microsoft Visual C++ redistributable 2008 SP1.
You can get it from Microsoft: http://www.microsoft.com/en-us/download/details.aspx?id=5638
Just in case, you can also install the “2005 SP1″ and “2010 SP1″ versions too.
(Some applications will need those too.)