0X80010134

CO_E_FAILEDTOGETWINDIR (0x80010134): Windows directory missing

Windows Errors Intermediate 👁 1 views 📅 May 28, 2026

This COM error hits when a program can't read the Windows folder path. Usually from a broken %SystemRoot% or corrupt registry key. Fix is quick.

When this error shows up

You're trying to launch an old program—maybe a custom line-of-business app from 2015, or a legacy installer. Instead of the welcome screen, you get a popup with error 0x80010134 and message CO_E_FAILEDTOGETWINDIR. The app closes immediately. This usually happens on a fresh Windows install or after moving user profiles across machines. The program can't find where Windows lives, so it gives up.

Root cause, plain and simple

Windows stores its own location in an environment variable called %SystemRoot%. Normally it points to C:\Windows. When that variable is missing, empty, or pointing to the wrong path, COM components throw error 0x80010134. Another common cause: the Software\Microsoft\Windows NT\CurrentVersion registry key has a bad SystemRoot value. This can happen after a botched OS update, a registry cleaner gone rogue, or manually moving the Windows folder (please don't do that).

The fix is straightforward—check the variable, fix the registry. I'll walk you through it.

Fix: Restore the Windows directory path

Step 1: Check your environment variable

  1. Press Win + R, type sysdm.cpl, hit Enter.
  2. Go to the Advanced tab, click Environment Variables.
  3. Under System variables, find SystemRoot. If it's missing, click New. If it exists but has a wrong value, select it and click Edit.
  4. Set the variable name to SystemRoot and the value to your Windows directory—typically C:\Windows. For 64-bit systems on a 64-bit install, it's always C:\Windows.

Step 2: Verify the registry key

  1. Open Registry Editor (regedit.exe).
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion.
  3. Look for a string value named SystemRoot. It should read C:\Windows (or your actual Windows folder). If it's wrong or missing, right-click in the right pane, choose New > String Value, name it SystemRoot, and set the data to C:\Windows.
  4. Close Registry Editor.

Step 3: Reboot and test

Restart your machine. The environment variables won't take effect until you do. After reboot, launch the program that gave the error. It should work now.

What if it still fails?

If the error persists, check two things:

  • Is the Windows folder actually at C:\Windows? Open File Explorer and verify. Some power users install Windows on D: or E:. Adjust the variable and registry value to match your real Windows folder.
  • Do you have multiple user accounts or profiles? If the error only happens under a specific user account, that user's environment might be corrupted. Try creating a new local admin account and test from there. If it works, you're looking at a user profile issue, not a system-wide one.

I've seen this error a dozen times over the years. In nine out of ten cases, the environment variable was wiped by a third-party optimizer. Skip those tools—they cause more problems than they solve.

Was this solution helpful?