I Remote Desktop Connection Error Code 0x904 Install Now
The error often appears because the HKEY_CLASSES_ROOT\RDP keys are missing. This is common after using registry cleaners like CCleaner.
To restore:
If none of the above work, the RDP client installation is fundamentally broken at the OS component store level. An In-Place Upgrade reinstalls Windows without deleting your apps or files.
Steps:
Windows component corruption is frequently the hidden reason for 0x904. Microsoft releases Servicing Stack Updates specifically to fix the Windows installer component that installs RDP features.
If you are using the Microsoft Store Remote Desktop client (Universal Windows Platform app) rather than the classic mstsc.exe, the 0x904 error indicates a corrupted AppX package.
How to reinstall the Store version:
If this error happens frequently, you can adjust the Group Policy settings on the remote computer to manage how console sessions are handled.
The RDP client installation uses Windows servicing stack (DISM / CBS). If the component store (%WinDir%\WinSxS) is corrupted or locked by another process, writing new RDP binaries fails with generic error 0x904.
| Component | Role | Failure point with 0x904 |
|-----------|------|---------------------------|
| tscupgrd.exe | Upgrades RDP client version | Writing new mstscax.dll to System32 |
| licmgr.exe | Manages RDP licenses | Creating MSLicensing registry hive |
| RDPActiveX.msi | Installs RDP web control | Extracting to %ProgramFiles%\Remote Desktop |
| dism.exe / cbs.dll | Servicing stack | Finalizing RDP feature installation (FOD) | i remote desktop connection error code 0x904 install
Call stack (typical):
ntdll!NtSetInformationFile
msi!MsiDatabaseCommit
tscupgrd!BeginInstall
rdpinstall!CInstallManager::CommitChanges
---> ERROR_MEDIA_WRITE_PROTECTED (0x904)
The Registry Fix (Client-Side): Sometimes the client fails to negotiate the gateway connection properly. You can force the client to bypass specific gateway checks (useful for testing installs):
Restart your connection and attempt the install again. The RDP client installation uses Windows servicing stack
