Update: Over 2 years later (August 2014), I still come across this problem. This time, the error code was 0x8004ff19, but the solution was the same: delete
"%PROGRAMFILES%\Microsoft Security Client" and re-install with the current installer.
It seems that there is a pretty bad problem with Microsoft Security Essentials. I was surprised to notice that it wasn't running on several machines. It turns out that an automatic upgrade through Windows Update fails in a very bad way: it sort of uninstalls the old version, and then fails to install the new version. Users don't notice anything special.
Trying to re-install it by hand also fails with a very informative message (as usual for MS error messages):
Cannot complete the Security Essentials installation
An error has prevented the Security Essentials setup wizard from completing successfully. Please restart your computer and try again.
Of course, clicking on the "Get help" link is of no help at all.
Apparently, the code "0x80070005" means "Access denied", but there is no way to find out to what the access was denied.
Searching through the event logs reveals other errors, which I will list here in the hope that it helps other Googlers
Log Name: System
Event ID: 20
Task Category: Windows Update Agent
Description: Installation Failure: Windows failed to install the following update with error 0x80070643: Microsoft Security Essentials Client Update Package - KB2691905.
Log Name: Application
Source: Microsoft Security Client Setup
Event ID: 100
Description:Cannot complete the Security Essentials installation. An error has prevented the Security Essentials setup wizard from completing successfully. Please restart your computer and try again. Error code:0x80070005. Access is denied.
And also older errors which may or may not be related:
Log Name: Application
Event ID: 72
Description: Activation context generation failed for "c:\program files\microsoft security client\MSESysprep.dll".Error in manifest or policy file "c:\program files\microsoft security client\MSESysprep.dll" on line 10. The element imaging appears as a child of element urn:schemas-microsoft-com:asm.v1^assembly which is not supported by this version of Windows.
Advice found on the web which didn't work:
- Uninstall MSSE then re-install (it was not listed in the installed programs, so I couldn't uninstall it)
- Uninstall any other anti virus software (I didn't have any)
- Run OneCareCleanup (silly because it was never installed)
Anyway, after a lot of useless searching and trying, what worked for me was to simply
rmdir /S /Q "%PROGRAMFILES%\Microsoft Security Client"
(Be careful with
rmdir /s /q ! It deletes the whole folder and sub-folders without asking first!)
After that, I could re-install normally.
But it is very disturbing to see that an antivirus can just stop working without any obvious alert or user notification.
PS: It turns out that even Mark Russinovich had a problem with MSSE. His immediate error was different, but was one I also eventually found in the logs. His solution was to delete the
HKCR\Installer\UpgradeCodes\11BB99F8B7FD53D4398442FBBAEF050F registry key. I had tried his procmon tool to try to find what returned "access denied", but then decided to resort to some primitive and brutal approaches first...