It`s a matter of access rights (error 5).
Are you installing avast in the default path?
Is there only one account with administration rights?
Can you post the last 100-150 lines of avast log? C:\Program Files\Alwil Software\Avast4\DATA\log\Setup.log