Problem Description
During SQL Server installation, it prompts that the WMI service cannot start.
How to fix SQL Server can’t start the WMI service?
1. Create a new txt file, copy the following code into it:
@echo on cd /d c:\temp if not exist %windir%\system32\wbem goto TryInstall cd /d %windir%\system32\wbem net stop winmgmt winmgmt /kill if exist Rep_bak rd Rep_bak /s /q rename Repository Rep_bak for %%i in (*.dll) do RegSvr32 -s %%i for %%i in (*.exe) do call :FixSrv %%i for %%i in (*.mof,*.mfl) do Mofcomp %%i net start winmgmt goto End :FixSrv
2. Change the file extension of the txt file to .bat
3. Run the bat file as an administrator
4. Open a CMD window, type Services.msc to check if the WMI service has started normally
5. If the service starts correctly, you can proceed to reinstall SQL Server.