SQL won’t install on XP

Problem

SQL Server Setup Failed to compile the Managed Object Format (MOF) file C:\Program Files\Microsoft SQL Server\90\Shared\sqlmgmproviderxpsp2up.mof.

This error message occurred as we tried to load SQL2005 after uninstalling all old SQL stuff and for the normal reinstall.

Solution

Forum:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/51ac73a2-14ce-4a99-b947-321167f7dd9f/cannot-install-sql-2005-failed-to-compile-the-managed-object-format-mof-file

Open a Command Prompt, elevated in Vista, and perform the following.
netstop winmgmt
ren %windir%\System32\Wbem\Repository %windir%\System32\Wbem\Repository.old
netstart winmgmt

If using Windows Vista – this command will check for inconsistances, and make repairs as needed.
winmgmt /salvagerepository

If using Windows XP – this command will detect, and repair inconsistancies.
rundll32 wbemupgd, UpgradeRepository

Next you will need to register the .DLL files associated with WMI Repository.
cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i