After being unable to install Windows Updates, the error code 80041002 may have been recorded when you checked the CBS logs. Here’s an excerpt from CBS.log:
000009a4 (F) Installer: Mof Binary Name: cmiadapter.dll ErrorCode: 80041002 Phase: 32 Mode: Install (upgrade) Component: Microsoft-Windows-NetworkProfile-CIM, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=amd64, versionScope=NonSxS[gle=0x80004005] Error CSI [email protected]/1/4:13:48:41.970 (F) CMIADAPTER: Exiting with HRESULT code = 80041002 [Error,Facility=FACILITY_ITF,Code=4098 (0x1002)]. Error CSI [email protected]/1/4:13:58:12.594 (F) CMIADAPTER: Inner Error Message from AI HRESULT = 80041002 [Error,Facility=FACILITY_ITF,Code=4098 (0x1002)]
Cause
The above error referencing “Name: cmiadapter.dll ErrorCode: 80041002
” is caused by a corrupt WMI repository.
Resolution
To resolve the WMI error 80041002
(“WBEM_E_NOT_FOUND”), repair, reset, or rebuild the WMI repository. Follow the method(s) below.
Note: To follow the instructions below, the admin Command Prompt should be enough in most cases. However, if you have an antimalware service (e.g., Malwarebytes) that depends on the WMI service, stopping WMI is difficult. In that case, you need to use the TrustedInstaller Command Prompt to complete the steps successfully.
Step 1) Repair the WMI repository
Open a Trusted Installer Command Prompt. To do so, you may use the AdvancedRun tool.
In the Trusted Installer Command Prompt, run the following commands to disable and stop the WMI service.
sc config winmgmt start= disabled net stop winmgmt
(Note: The blank space after start= is intentional)
When you see the following message, press Y
Stopping the Windows Management Instrumentation service will also stop these services.IP HelperDo you want to continue this operation? (Y/N)
And then run the following commands to backup and repair the repository:
winmgmt /backup c:\wmirepository.bak winmgmt /salvagerepository sc config winmgmt start= auto
Restart Windows. See if you’re able to install updates. If that doesn’t help, proceed to Step 2 below.
Step 2) Reset the WMI Repository
Open a Trusted Installer Command Prompt, and run the following commands.
sc config winmgmt start= disabled net stop winmgmt
(the blank space after start= is intentional)
And then run the following command to reset the repository to Windows defaults:
winmgmt /resetrepository sc config winmgmt start= auto
Restart Windows. If the problem persists, proceed to Step 3 below.
Step 3) Rebuild the WMI repository Completely
Open a Trusted Installer Command Prompt, and run the following commands.
sc config winmgmt start= disabled net stop winmgmt
(the blank space after start= is intentional)
Open File Explorer and rename the folder “%windir%\System32\wbem\repository” to repository.old.
Re-enable the WMI service by typing the following command:
sc config winmgmt start= auto
Next, recreate the repository. One of the ways to do so is by using wmimgmt.msc
.
Launch wmimgmt.msc
Right-click “WMI Control (Local)” and click Properties.
The above step recreates the repository, which might take a minute or so.
Restart Windows.
You should now be able to install Windows Updates.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!