I ran into an issue where I could not install the CM agent. This was the fix.
- Repair WMI
- Repair MOF
- Repair system files
- Reset Windows Updates
CCMSetup.log Errors
File C:\WINDOWS\ccmsetup\{1990B09E-077D-46F9-B575-2AB675E44670}\client.msi installation failed. Error text: ExitCode: 1603
Action: SmsClientInstallSucceeded.
ErrorMessages:
An error occurred during the installation of assembly ‘Microsoft.ConfigurationManager.WinRTProvider.dll,Version=”5.0.0.0″,Culture=”neutral”,PublicKeyToken=”31bf3856ad364e35″‘. Please refer to Help and Support for more information.
MSI: Action 21:55:12: CcmRegisterComponentsRollback. In the event of a failed installation, this action rolls back the changes from CcmRegisterComponents.
Failed to connect to policy namespace. Error 0x8004100e
Failed to get MDM_ConfigSetting instance, 0x80041010
CcmSetup failed with error code 0x80070643
Solution (script.cmd)
* save and run as admin
:: MrNetTek :: eddiejackson.net :: 3/18/2021 :: free for public use :: free to claim as your own @echo off net stop ccmexec /y c:\windows\ccmsetup\ccmsetup.exe /uninstall net stop VMAuthdService /y ::sc config winmgmt start= disabled net stop winmgmt /y %systemdrive% cd %systemroot%\system32\wbem rd /S /Q repository regsvr32 /s %systemroot%\system32\scecli.dll regsvr32 /s %systemroot%\system32\userenv.dll mofcomp cimwin32.mof mofcomp cimwin32.mfl mofcomp rsop.mof mofcomp rsop.mfl for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s for /f %%s in ('dir /b *.mof') do mofcomp %%s for /f %%s in ('dir /b *.mfl') do mofcomp %%s mofcomp exwmi.mof mofcomp -n:root\cimv2\applications\exchange wbemcons.mof mofcomp -n:root\cimv2\applications\exchange smtpcons.mof mofcomp exmgmt.mof For /f %%s in ('dir /b *.dll') do regsvr32 /s %%s wmiprvse /regserver winmgmt /regserver net start winmgmt net start VMAuthdService reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f net stop wuauserv rd %systemroot%\SoftwareDistribution /Q /S SC sdshow wuauserv SC sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU) wuauclt.exe /detectnow chkdsk /f mofcomp "C:\Program Files\Microsoft Policy Platform\ExtendedStatus.mof" fsutil resource setautoreset true C:\ timeout /t 300 shutdown -r -f -t 0
Notes
2013 Redistributable – 12.0.40664.0, or later
Update for Microsoft Silverlight (KB4481252)
Verify Permissions On
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\Configuration Manager
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks
Copy Accessibility.dll from a Working Machine
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a