I was troubleshooting configmgr 2012 R2 client,the other day ,I found below error from ccmsetup.log
MSI: Setup was unable to compile the file AppSynclet_Local.mof The error code is 80041002
Error code 80041002 says ,Not found.Source: Windows Management (WMI)
I tried compiling the AppSynclet_Local.mof (C:\windows\ccm) file, it throw error saying,syntax errors in line 22. This pushed me to cop MOF file from working PC if that make any difference but it did not work.
if you look into the mof file,it is trying to operate on \\Root\\CCM\ namespace ,which do not exist on the problem client.
I suspected this is WMI issue but repairing the wmi did not fix the problem. (Repairing wmi and installing the client did not solve the issue)
Finally ,I decided to play with SMSCFG.INI and SCCM certificates if they found on the PC . steps that I listed below worked for this problem.
- ccmsetup.exe /uninstall
- repair wmi using script available here
- RD /s /q "C:\Windows\ccmsetup"
- RD /s /q "C:\Windows\CCM"
- RD /s /q "C:\Windows\system32\CCM"
- DEL /q "C:\windows\smscfg.ini
- REG DELETE HKLM\software\Microsoft\ccm /f
- REG DELETE HKLM\software\Microsoft\CCMSETUP /f
- REG DELETE HKLM\software\Microsoft\SMS\
- REG DELETE HKLM\software\Microsoft\Systemcertificates\SMS\Certificates /f
- ccmsetup.exe SMSSITECODE=PS1 SMSMP=SGCM01.Corp.eskonr.com (replace your command line properties)
Hope it helps!
15 Comments
## Uninstall CCMCLient ##
Start-Process "C:\Windows\ccmsetup\ccmsetup.exe" -argumentlist "/uninstall" -Wait
## Repair WMI ##
Start-Process "C:\Windows\System32\wbem\WinMgmt.exe" -ArgumentList "/clearadap" -Wait
Start-Process "C:\Windows\System32\wbem\WinMgmt.exe" -ArgumentList "/kill" -wait
Start-Process "C:\Windows\System32\wbem\WinMgmt.exe" -ArgumentList "/unregserver" -wait
Start-Process "C:\Windows\System32\wbem\WinMgmt.exe" -ArgumentList "/regserver" -wait
Start-Process "C:\Windows\System32\wbem\WinMgmt.exe" -ArgumentList "/resyncperf" -wait
Stop-Service winmgmt -Force
Remove-Item -Path "C:\Windows\system32\wbem\repository.old" -Force | Out-Null
Remove-Item -Path "C:\Windows\system32\wbem\Repository\repository.old" -Force | Out-Null
Start-Process "C:\Windows\System32\regsvr32.exe" -ArgumentList "/s C:\Windows\System32\system32\scecli.dll" -Wait
Start-Process "C:\Windows\System32\regsvr32.exe" -ArgumentList "/s C:\Windows\System32\system32\userenv.dll" -Wait
$dlls = Get-ChildItem "C:\Windows\System32\wbem\" -Filter *.dll
$mofs = Get-ChildItem "C:\Windows\System32\wbem\" -Filter *.mof
$mfls = Get-ChildItem "C:\Windows\System32\wbem\" -Filter *.mfl
ForEach ($dll in $dlls){
Start-Process "C:\Windows\System32\regsvr32.exe" -ArgumentList "/s $dll.fullname" -Wait -PassThru
}
ForEach ($mof in $mofs){
Start-Process "C:\Windows\System32\wbem\mofcomp.exe" -ArgumentList "/s $mof.fullname" -Wait -PassThru
}
ForEach ($mfl in $mfls){
Start-Process "C:\Windows\System32\wbem\mofcomp.exe" -ArgumentList "/s $mfl.fullname" -Wait -PassThru
}
Start-Service winmgmt -Force
Start-Process "C:\Windows\System32\wbem\wmiprvse.exe" -ArgumentList "/regserver" -Wait
Remove-Item "C:\Windows\ccmsetup" -Force -Recurse | Out-Null
Remove-Item "C:\Windows\CCM" -Force -Recurse | Out-Null
Remove-Item "C:\Windows\System32\CCM" -Force -Recurse | Out-Null
Remove-Item "C:\Windows\smscfg.ini" -Force -Recurse | Out-Null
Remove-Item -Path HKLM:\SOFTWARE\Microsoft\CCM -Force -Recurse | Out-Null
Remove-Item -Path HKLM:\SOFTWARE\Microsoft\CCMSETUP -Force -Recurse | out-null
Remove-Item -Path HKLM:\SOFTWARE\Microsoft\SMS -Force -Recurse | out-null
Remove-Item -Path HKLM:\SOFTWARE\Microsoft\SystemCertificates\SMS\Certificates -Force -Recurse | out-null
hi,
thanks for the update and appreciate your sharing.
Thanks,
Eswar
Pingback: Rebuild a failed SCCM client | Scripting, Etc.
i am troubleshooting SCCM Clients for Customers this one is one of my favourites
very usefull thanks
Hi Martin,
Glad that, it worked out for you.
Hey Eswar,
I did run into this problem today and was unable to fix it by rebuilding the WMI repo and uninstalling the client.
I followed the extra steps mentioned here and after that the client installed flawless! Thanks!
Great Remco,Glad it solved your issue .
Hello Eswar,
Just wanted to drop a line to say thank you so much for the excellent detailed steps on how to successfully complete an SCCM installation. I was getting the error above and now re-trying the installation it is successful.
Regards,
CMI
Great ,thanks for your kind words Carlos and hope you have enjoyed reading this blog.
Do you know about this error fix?
MSI: Varoitus 25702. Failed to uninstall PrepDrvr.Sys for Software Metering Agent.
i have not seen this error ,no fix for now but you can troubleshoot based on the logs (ccmsetup.log,client.msi.log) .you can do clean ccmsetup uninstall ,try install.
How can get this into report.
report for this specific error ? not an easy task but you can use FSP reports to check client installation failures .
Hi Eswar, Thank you for the post.
Can we use the same steps for general WMI issues where clients did not get installed with Client push installation.
can use but if the issue is more related to WMI,you should correct the wmi instead of doing other steps but there is nothing wrong in doing steps what i said in the post.