Home › Microsoft 365 Apps for Enterprise › 0xC0000034

Microsoft 365 Apps for Enterprise · 0xC0000034 · Windows 11 23H2

MS365 Apps Install Fails 0xC0000034 Windows 11 23H2

Orphaned registry entries or WMI corruption cause installation failure; use Office Scrub Tool and clear pending reboots to fix.

Error Details

FactValueSourceNote
Exact error stringHRESULT 0xC0000034 (STATUS_OBJECT_NAME_NOT_FOUND)setup.log, officeclicktorun.exe.log->
Affected build rangeWindows 11 23H2
Registry key involvedHKLM:\SOFTWARE\Microsoft\Office\ClickToRun->
Relevant service/endpoint URLhttps://setup.office.microsoft.com/
Log line signature0xC0000034setup.log, officeclicktorun.exe.log->

Log Files to Check

What This Error Actually Means

The HRESULT 0xC0000034 (STATUS_OBJECT_NAME_NOT_FOUND) error is a critical issue that occurs during the installation or update process of Microsoft 365 Apps for Enterprise, specifically when using Click-to-Run deployment. The error indicates that the Office setup program cannot find an expected registry key or file, which is essential for completing the package extraction and configuration steps. This failure typically happens in the early stages of the installation process, where the installer attempts to validate existing installations and prepare necessary directories and files. The component responsible for raising this error is the Office Click-to-Run setup utility (officeclicktorun.exe), which interacts with Windows registry entries under HKLM:\SOFTWARE\Microsoft\Office\ClickToRun. This utility relies on accurate and complete information in these registry keys to proceed with installation tasks, such as identifying existing installations or determining necessary updates.

Affected Versions and Scope

This error primarily affects systems running Microsoft 365 Apps for Enterprise installed via Click-to-Run deployment on Windows 11 23H2. It does not typically occur in other versions of Windows, nor is it a common issue with MSI installations of Office products. The error can impact both standalone installations and deployments managed through Intune or similar MDM solutions. However, the exact manifestation may vary depending on whether the installation was initiated manually by users or pushed via an automated deployment process.

Where To Look First: Logs and Event IDs

To diagnose this issue effectively, you should first examine two specific log files: - C:\Windows\Temp\Microsoft\ODT\setup.log - C:\Windows\Temp\officeclicktorun.exe.log In these logs, look for the exact error string HRESULT 0xC0000034. The relevant lines will often include details about missing registry keys or files that are critical to the installation process. Additionally, check Event Viewer > Application for Event ID 1001 (Windows Error Reporting) where the faulting module is OfficeClickToRun.exe. This event will provide additional context regarding the exception code and the time of occurrence, which can be crucial in pinpointing when the issue began or was last encountered during installation attempts.

Root Causes

Orphaned Registry Entries

One common cause is orphaned registry entries under HKLM:\SOFTWARE\Microsoft\Office\ClickToRun. These are remnants of previous partial installations that failed to complete properly, leaving behind incomplete or conflicting data in the registry.

Pending Windows Reboot

Another frequent issue is a pending system reboot blocking the installer from writing necessary files and registry keys. This can occur if certain system updates or other installations require a restart before proceeding with further changes.

WMI Corruption

Corruption in the Windows Management Instrumentation (WMI) repository can also lead to this error, as the Office setup utility relies on WMI queries to determine installed components and their statuses. If these queries fail due to corruption, the installer cannot proceed correctly.
Warning: Running certain repair commands for WMI may temporarily disrupt device management capabilities until the system is fully rebooted.

Fix Procedure

  1. Remove Orphaned Registry Entries: Use the Office Scrub Tool (OffScruBB.diagcab) to remove all Office registry artifacts and file remnants. This tool should be run in Safe Mode to ensure a clean environment.
    <Run OffScruBB.diagcab in Safe Mode>
  2. Clear Pending Reboot Flags: Execute the following PowerShell command to clear any pending reboot operations that might be blocking installation:
    Remove-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager' -Name PendingFileRenameOperations -ErrorAction SilentlyContinue
    After running this, a system restart is necessary before attempting the Office installation again.
  3. Repair WMI Repository: If WMI queries return errors, repair the repository using these commands from an elevated command prompt:
    winmgmt /verifyrepository
    winmgmt /salvagerepository
    After repairing, ensure a full system reboot before retrying installation.
  4. Redeploy via Microsoft 365 Admin Center: Use the Office Deployment Tool with a clean configuration.xml file specifying OfficeClientEdition=64 and RemoveMSI='All'. Navigate to Intune admin center > Apps > Microsoft 365 Apps, then redeploy using this updated configuration.

Error Code Variants

Error CodeDescription
0xC0000139 (STATUS_DLL_NOT_FOUND)This error indicates that a required DLL is missing, often due to incomplete installations or corrupted system files.
0xC0000265 (STATUS_ACCESS_VIOLATION)Suggests an access violation occurred during installation, usually related to insufficient permissions or file conflicts.

Verification

To verify that the fix has been successful, re-examine the setup.log and officeclicktorun.exe.log files for any instances of HRESULT 0xC0000034. Additionally, check Event Viewer > Application for Event ID 1001 to ensure no new error reports are generated related to OfficeClickToRun.exe. In the Intune admin center, navigate to Apps > Microsoft 365 Apps and verify that the deployment status reflects successful installation or updates without errors.

Prevention

Implement a baseline policy ensuring all Windows systems are kept up-to-date with necessary patches and reboots. This can be achieved through Group Policy Objects (GPO) or Intune configurations to enforce automatic restarts after critical updates. Additionally, establish a routine for cleaning up orphaned registry entries and WMI repositories as part of regular maintenance tasks. Using scripts that periodically run Office Scrub Tool and repair commands can help prevent the accumulation of problematic artifacts over time.
TIP: Use Get-WmiObject Win32_Product | Where-Object {$_.Name -like '*Office*'} to quickly list all installed Office products and identify any that may need further investigation or removal.
By following these detailed steps, you can effectively troubleshoot and resolve the HRESULT 0xC0000034 error encountered during Microsoft 365 Apps for Enterprise installations on Windows 11 systems.

Sources & References

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.