SCCM client installation failed with “MSI: Setup was unable to compile the file ccmclasses.mof The error code is 8004402F”

MSI: Setup was unable to compile the file ccmclasses.mof
The error code is 8004402F

Background

SCCM client installation can failed due to various reasons, one of which could be the following:

MSI: Setup was unable to compile the file ccmclasses.mof
The error code is 8004402F

Error code 8004402F indicates (you can check the code meaning with CMTrace tool: Press CTRL + L to launch Error Lookup window):

Error creating temporary file
Source: Windows Management (WMI)

Most of the time this was caused by lack of “Modify” and “Write” permissions to the temporary folder of the installation user.

Solution

  1. First, make sure the installation user have local Admin rights
  2. Then go to Control Panel>System and Security>System>Advanced System settings
  3. Click on Environment Variables… See the figure below.
  4. Verify TEMP and TMP in System Variables are respectively C:\windows\TEMP and C:\windows\TEMP
  5. Make sure that the installation user has Modify and Write permissions to TEMP and TMP
  6. If the installation fails with the same exception even after those changes, try to compile ccmclasses.mof manually:
    1. Open command prompt as Administrator
    2. Navigate into C:\windows\CCM: cd c:\windows\CCM
    3. Run: mofcomp ccmclasses.mof
    4. Retry the installation
Environment Variables

SCCM client installation failed with “Setup was unable to compile the file DiscoveryStatus.mof”

File C:\Windows\ccmsetup{7E31AE3A-2706-4A34-9970-73A5526B5346}\client.msi installation failed. Error text: ExitCode: 1603
Action: CcmRegisterWmiMofFile.
ErrorMessages:
Setup was unable to compile the file DiscoveryStatus.mof
The error code is 80041002

Issue

During SCCM 1810 client installation process, installation failed with ccmsetup.log showing the following exceptions:

File C:\Windows\ccmsetup{7E31AE3A-2706-4A34-9970-73A5526B5346}\client.msi installation failed. Error text: ExitCode: 1603
Action: CcmRegisterWmiMofFile.
ErrorMessages:
Setup was unable to compile the file DiscoveryStatus.mof
The error code is 80041002

As you can see, the direct reason was that DiscoveryStatus.mof compilation failed.

Solution

  1. Open command prompt as administrator
  2. Navigate into C:\Program Files\Microsoft Policy Platform
  3. Run: mofcomp ExtendedStatus.mof
  4. Retry SCCM client installation

Note that my case happened in SCCM 1810. However, this solution also applies to SCCM 2012. If you come across the issue in other versions of SCCM, just give it a try.

Design a site like this with WordPress.com
Get started