SQL Setup error on Vista: SQL Server Setup Failed to compile MOF

I was attempting to install MS SQL Server 2005 Express edition without success on a computer run Windows Vista Business. There was an error message mentioned “…failed to compile the Managed Object Format (MOF)…” I’ve tried about five times with various solutions; still it didn’t fix the problem.

As always, I found a working solution when I was about to give up on this installation. The problem was that the WMI repository was corrupted. There are two ways to fix this: one is to reinstall the WMI, and alternatively you can repair it instead.

I opted for the 2nd option. Here is how you can do it. Run the command prompt (cmd) as the administrator. Then execute this command:

winmgmt /salvagerepository

Wait for a lil while, you should see the following error message:


WMI repository salvage failed
Error code: 0x8007041B
Facility: Win32
Description: A stop control has been sent to a service that other running ser
vices are dependent on.

Then, re-execute the same command for one more time to finally repair the WMI repository.


C:\Windows\system32>winmgmt /salvagerepository
WMI repository has been salvaged

Once you’ve finished the above step, try to reinstall the SQL Server 2005 Express edition again. Please be sure to install the latest version of the SQL Server Express edition which is the SQL Server 2005 Service Pack 2.

Source: SQL Server Setup error on Vista

About these ads

7 thoughts on “SQL Setup error on Vista: SQL Server Setup Failed to compile MOF

  1. bill says:

    this won’t work for me when I run winmgmt /salvagerepository it says my WMI repository is consistent, but I still get the error message about the MOF file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s