SCCM Configmgr 2012 Client issue Setup was unable to compile the file AppSynclet_Local.mof 80041002

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.

  1. ccmsetup.exe /uninstall
  2. repair wmi using script available here
  3. RD /s /q "C:\Windows\ccmsetup"
  4. RD /s /q "C:\Windows\CCM"
  5. RD /s /q "C:\Windows\system32\CCM"
  6. DEL /q "C:\windows\smscfg.ini
  7. REG DELETE HKLM\software\Microsoft\ccm /f
  8. REG DELETE HKLM\software\Microsoft\CCMSETUP /f
  9. REG DELETE HKLM\software\Microsoft\SMS\
  10. REG DELETE HKLM\software\Microsoft\Systemcertificates\SMS\Certificates /f
  11. ccmsetup.exe SMSSITECODE=PS1 (replace your command line properties)

Hope it helps!

15 Responses to "SCCM Configmgr 2012 Client issue Setup was unable to compile the file AppSynclet_Local.mof 80041002"

  1. ## 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

  2. 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!

  3. 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.



    1. 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.

  4. 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.

    1. 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.


Leave a Reply