SQL Server 2008 Setup : Windows Management Instrumentation (WMI) service failed.
I install SQL Server 2008 R2 on my new computer at work.
Actually I had some difficulties while installing SQL Server 2008 R2 due to Windows Management Instrumentation (WMI) service failure.
When SQL Server 2008 setup started, first the Setup Support Rules runs and checks if there is any problem that will affect Microsoft SQL Server 2008 R2 instance on the computer.
Here is the first check results on my computer.
Rule Check Result
Rule "Windows Management Instrumentation (WMI) service failed.
The Windows Management Instrumentation (WMI) service cannot be started.
To continue with the installation, you must troubleshoot and repair your Windows Management Instrumentation (WMI) service.
When I search a little on the web about this topic, I found a discussion on MSDN at thread titled "SQL Express 2008 Installation error" at this URL. Actually this seems to be the same error with my case where I try to install SQL Server 2008 R2.
It is stated that although WMI service is corrupt, it might appear to be running when checked using the Services Management Console.
This is strange since when I open the Services Management Console the WMI service is displayed with Started status.
One of the methods you can use to determine whether the WMI service is running or not is checking the "Dependencies" tab of the WMI service properties screen.
Right click on the WMI service in the management console. Right click on the service name and choose Properties from the context menu.
Activate the "Dependencies" tab. If you are displayed an error such as "WMI: Initialization Failure" then you can be sure that the WMI service is not up and actually running.
I got the following error on Service Dependencies tab of the WMI service (Windows Management Instrumentation).
WMI: Initialization failure
One of the participants named Angrydavie offered to reinstall WMI service.
He has also given the script to reinstall WMI service which re-register WMI.
Please note that it is your own risk if the script corrupts Windows folders.
Open NotePad and copy the above script code.
Save the WMI script text file as "reinstall-wmi.bat"
Double click the .bat batch file to execute the script.
After running the above script, I restarted my computer.
After reboot, the SQL Server Setup Support was successfully worked.