SQL won’t install on XP


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.



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