Operating system restart needed by avast message - First check the contents of the C:\Program Files\Alwil Software\Avast4\Setup\setup.log file, which should show you why it thinks the reboot is needed.
This may be solved, in some systems, by deleting the file C:\Program Files\Alwil Software\Avast4\Setup\reboot.txt (seems to have failed in your case). With the avast self-defence module it will complain (did it) so disable that first, Program Settings, Troubleshooting.
If that doesn't resolve it check this:
You can also check this registry entry (right after computer restart):
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager, if it contains "PendingFileRenameOpertaions".
Check its contents and if there's only "reboot.txt" from avast4\setup folder, delete PendingFileRenameOperations, don't delete any other key.
Back-up (export) the registry key before you edit/delete, just in case.
It may be quicker to do a clean reinstall though than try and chase the fault.
Download the latest version of avast
http://www.avast.com/eng/download-avast-home.html and save it to your HDD, somewhere you can find it again. Use that when you reinstall.
Download the avast! Uninstall Utility,
find it here and save it to your HDD.
1. Now uninstall (using add remove programs, if you can't do that start from the next step), reboot.
2. run the avast! Uninstall Utility, reboot. If step 1 failed it may be necessary to run this from safe mode, once complete reboot into normal mode.
3. install the latest version, reboot.