I Remote Desktop Connection Error Code 0x904 | Install
Remote Desktop connection error (often accompanied by extended error code
typically signals a failure in the initial handshake between the client and host
. While it often appears as a generic network issue, it is frequently caused by expired security certificates, firewall blocks, or network instability. Common Root Causes Expired RDP Certificates:
Self-signed certificates used by Remote Desktop Services often fail to renew automatically, leading to a silent connection failure. Network Instability:
Low bandwidth, high packet loss, or slow VPN connections can trigger this timeout. Firewall & Antivirus Blocks: Security software may block even if RDP is technically enabled. Azure VM Corruption: In Azure environments, a corrupt MachineKeys
store can prevent the creation of necessary RDP certificates. www.remoteaccesspcdesktop.com Step-by-Step Fixes 1. Renew Expired RDP Certificates
This is the most common resolution for persistent 0x904 errors on physical servers. www.remoteaccesspcdesktop.com
Access the host machine locally or via an alternative remote tool. Certificates MMC snap-in certlm.msc Navigate to Remote Desktop > Certificates
Check the expiration date; if it has passed, delete the expired certificate. Restart the Remote Desktop Services
via Command Prompt (Admin) to force Windows to generate a new certificate: restart-service termserv -force www.remoteaccesspcdesktop.com 2. Fix Azure VM Certificate Corruption For Azure VMs, use the Run command feature in the portal to rename the MachineKeys C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys ) to force a certificate regeneration, then restart the VM. www.remoteaccesspcdesktop.com 3. Update Firewall and Network Rules
is permitted through the Windows Firewall for all network types, specifically checking for port 3389. www.remoteaccesspcdesktop.com Unable to RDP into some Windows Servers - Error code: 0x904
Quick checklist (try in order)
-
Restart and retry install
- Reboot the PC, then run the Remote Desktop install/update again.
-
Run Windows Update
- Install all pending updates, reboot, then retry.
-
Run SFC and DISM
- Open an elevated Command Prompt and run:
sfc /scannow DISM /Online /Cleanup-Image /RestoreHealth - Reboot and retry the install.
- Open an elevated Command Prompt and run:
-
Temporarily disable security software
- Temporarily disable third‑party antivirus/firewall and any other remote-access tools (TeamViewer, AnyDesk, VPN clients), install, then re-enable.
-
Ensure required Windows features are enabled
- For Remote Desktop client/host, confirm relevant features are on:
- Settings → Apps → Optional features (search for Remote Desktop or related components)
- Control Panel → Programs → Turn Windows features on or off (if applicable)
- If installing RDP host (Remote Desktop Services), use Server Manager (Windows Server) or Settings → Remote Desktop (Windows 10/11).
- For Remote Desktop client/host, confirm relevant features are on:
-
Check Windows Installer and services
- Ensure these services are running: Windows Installer, Remote Desktop Services, RPC. Restart them if needed:
- Services.msc → right‑click service → Restart.
- Ensure these services are running: Windows Installer, Remote Desktop Services, RPC. Restart them if needed:
-
Clean up installer state
- If a previous install hung, run Microsoft’s Program Install and Uninstall troubleshooter (Fix-It) to remove broken installer entries, then reinstall.
-
Check Event Viewer for details
- Event Viewer → Windows Logs → Application/System around the failure time; note error IDs/messages for targeted fixes.
-
Try an elevated manual install
- If you have an installer package, right‑click → Run as administrator. For package-based installs (MSI), run from an elevated CMD:
msiexec /i "path\to\installer.msi" /l*v installlog.txt - Inspect installlog.txt for specific failures.
- If you have an installer package, right‑click → Run as administrator. For package-based installs (MSI), run from an elevated CMD:
-
Create a new local admin account
- Occasionally user‑profile corruption blocks installs. Create a new local admin, sign in, and try installing.
Method 1: Log Off the Existing Session
The most common fix is ensuring you are not logged into the remote computer elsewhere.
- Check Physical Access: If you (or someone else) are physically at the remote computer, ensure the user account you are trying to connect with is logged out. The lock screen (Windows Key + L) is not enough; the user must be fully signed out (Start Menu > Power > Sign out).
- Disconnect Properly: When you are finished using RDP, avoid simply closing the window. Use the Start Menu inside the RDP session to select Sign out. This ensures the session is terminated on the host machine.
Solution 1: Re-register the Core RDP DLL Files
The most common cause of 0x904 is a broken registration of the Terminal Services client libraries. We need to manually re-register them using the regsvr32 command. i remote desktop connection error code 0x904 install
Instructions:
-
Press
Windows Key + Xand select Terminal (Admin) or Command Prompt (Admin). -
If using PowerShell, ensure you are in Admin mode.
-
Type the following commands one by one, pressing Enter after each line:
regsvr32 /u mstscax.dll regsvr32 mstscax.dll regsvr32 /u mstsc.exe regsvr32 mstsc.exe regsvr32 /u rdpcore.dll regsvr32 rdpcore.dll -
You should see a success message: "DllRegisterServer in mstscax.dll succeeded."
-
Restart your computer and test the Remote Desktop connection.
Why this works: The /u flag unregisters the file (clearing any corrupted configuration), and the second command re-registers it with fresh settings.
Summary
Error code 0x904 is frustrating but rarely dangerous. It simply means the remote computer is reserving your user profile for a session that is already active. By ensuring the previous session is fully signed out (either physically or via the command line), you should be able to establish your Remote Desktop connection immediately.
If you continue to experience issues, ensure your Windows OS is fully updated, as Microsoft occasionally releases patches for RDP bugs.
The Remote Desktop error code 0x904 (often accompanied by extended error 0x7) is a common hurdle for IT admins and remote workers. It typically signals a communication breakdown between your computer and the remote host, often due to expired security certificates or network instability.
Here is a short story of how an admin might encounter and solve this issue: The "Silent Expiration" Mystery Restart and retry install
Imagine a Tuesday morning where everything seems normal until you try to log into a critical Windows Server. Instead of the familiar desktop, you're hit with a popup: "This computer can't connect to the remote computer. Error code: 0x904".
You check the server—it’s online. You check other servers on the same subnet, and they work perfectly. This "random" behavior is the first clue. As documented by experts at TheITBros.com, this error often stems from unstable network paths or VPN bottlenecks, but when it's specific to just one machine, the culprit is usually deeper. The Investigation
After digging through Reddit, you realize the issue might be an expired self-signed certificate. RDP uses these certificates to secure the "tunnel" between machines. If the certificate expires—which happens silently without warning—the connection simply drops.
To resolve this, you might follow these steps used by seasoned sysadmins:
Renew the Certificate: Log in locally (or via another remote tool) and open the Certificates manager (certlm.msc). Under Remote Desktop > Certificates, you find the expired one, delete it, and restart the Remote Desktop Services. Windows then automatically generates a fresh, valid certificate.
Firewall Check: Sometimes, a simple rule change is needed. As suggested by users on Spiceworks Community, you verify that both "Remote Desktop" and "Remote Desktop (WebSocket)" are allowed through the Windows Firewall on both ends.
The Windows 11 Workaround: If you are on Windows 11 and still stuck, a known fix discussed on the Devolutions Forum is to connect using the server's IP address instead of its hostname, or to switch to the Microsoft Store version of the Remote Desktop app.
Once the new certificate is in place and the network path is clear, the connection is restored, and the 0x904 error vanishes as quickly as it appeared. Unable to RDP into some Windows Servers - Error code: 0x904
This is a deep-dive technical article designed to troubleshoot and resolve Remote Desktop Protocol (RDP) Error Code 0x904, specifically focusing on the scenarios where it interrupts installation, connection setup, or remote software deployment.
Installation and Reinstallation Steps
If you still encounter issues, try:
- Reinstalling the Remote Desktop client: Uninstall the client (if possible) and then reinstall it. For most Windows versions, this might not be straightforward since it's a built-in component, but you can try updating it via Windows Update or reinstalling Windows.
- Using an Alternative: Consider using an alternative remote connection tool like TeamViewer, AnyDesk, or Chrome Remote Desktop.