Error 0xC1900204 During Windows 10 or 11 Setup

When you install a feature update via the Windows Update, the error code 0xC1900204 may occur.

There were problems installing some updates, but we'll try again later.

Error 0xC1900204

windows update error - programfilesdir change registry

If you use the Media Creation Tool to do an in-place upgrade, the only option you may get is to delete your files (which most users don’t want to do). The dialog states the following:

Your files, apps, and settings can’t be kept because your current version of Windows might be installed in an unsupported directory, or you’re trying to install an older version of Windows.

windows update error - programfilesdir change registry

Cause

The above symptoms occur if you’re redirected the “Program Files” or the “Program Files (x86)” folder using the registry. Microsoft does not support changing the location of the Program Files folder by modifying the ProgramFilesDir registry value. If you change the location of the Program Files folder, you may experience problems with some Microsoft programs or software updates.



The Windows setup log (setupact.log) file may have the following entries:

Info CONX ConX::Compatibility::CSystemAbstraction::GetHostProgramFilesx86Directory: Host program files x86 directory: E:\Program Files (x86).
Info CONX CNonStandardDirectoryChecker: checked NonStandardDirectory, found HardBlock.Program files x86 directory E:\Program Files (x86) is not on system drive C:
Info                  CONX   ConX::Compatibility::CCompatibilityHost::SetScanResult: Provider wsc:setup: reports HardBlock
Info                  CONX   Reporting block for Categories: 0x00000040 
2023-04-08 19:08:38, Info                  CONX   Reporting block for Categories: 0x00000100 
2023-04-08 19:08:38, Info                  CONX   Compatibility scan data is saved to C:\$WINDOWS.~BT\Sources\Panther\CompatData_2023_04_08_19_08_38_3_00000140.xml.

Resolution

To resolve the setup error 0xC1900204, fix the Program Files path in the registry.

  1. Open the Registry Editor (regedit.exe)
  2. Navigate to the following key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
  3. Set the data for “ProgramFilesDir” to C:\Program Files
  4. Set the data for “ProgramFilesDir (x86)” to C:\Program Files (x86)
  5. Set “ProgramFilesPath” to %ProgramFiles% (ensure that its value type is REG_EXPAND_SZ)

    windows update error - programfilesdir change registry

  6. Exit the Registry Editor.
  7. Restart Windows.
C:\ is used in the above steps, because in most cases, Windows is installed on the C:\ drive. If your Windows drive-letter is not C:\, use the correct drive-letter when modifying the above values. To know the OS drive letter in your computer, type the command echo %homedrive% in the Command Prompt window.

Re-run the setup. Hopefully, it should work now.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment