By Ellie / Last Updated November 23, 2022

Remote Desktop closes immediately after login

The Remote Desktop Connection app closed immediately after login every time, can anyone has the same issue or has any idea about how to fix it. 

1) My laptop is running Windows 10 Home Pro.

2) The issue start about a few weeks ago. 

3) There is now an error message that shows up after the app closed.

4) The internet is stable and in good status. 

- Question from

Remote Desktop Connection

Why does Remote Desktop keep closing?

It's frustrated to encounter RDP disconnecting immediately after login in Windows 11/10/8/7 and Windows Server 2012 R2/2016/2019/2022 when we access a PC from another PC remotely. Follow me to get possible reasons that trigger off "Remote Desktop Connection closes immediately after login".

▪ Reason 1. The blockage of firewall
Remote Desktop connections do not have the permissions allowed by the firewall. Therefore, the Defender Firewall will block the Remote Desktop Connection, thus the Remote Desktop connection closes immediately after login.

▪ Reason 2. The system files are corrupted
It is said that if you miss some system files like the .dll file, and then your Windows features, including RDP aren’t working or Windows crashing. 

▪ Reason 3. Update broke those patches
If you update to Win 10 or Win 11, there may be because of your update breaking the patches, indirectly causing the Remote Desktop to close or disconnects after the update immediately.

4 ways to fix Remote Desktop closes immediately after login

 There are 4 useful solutions to help you address Remote Desktop closes immediately after login Windows 10/11/8/7 and Windows Server. Just follow them in order, step by step, and we’ll try to get you back on track.

Method 1. Turn off Firewall

First of all, make sure that you have enabled Remote Desktop through Firwall. 

Step 1. Press Windows + R, input the control panel, and then click “system and security”, choose" Windows Defender Firewall", then “Allow an app or feature through Windows Defender Firewall”.


Step 2. Go to the Allowed apps screen, click on “Change settings" and then scroll down to check Remote Desktop in this list. Make sure that you’ve allowed this app to the Public. Click "OK".


Step 3. After finishing the above steps, reboot the machine.

Method 2. Perform a system file check  using CMD

If Remote Desktop closes unexpectedly or Windows crashes, use the System File Checker to scan Windows and restore your files. 

Step 1. In the search box, input "cmd", right-click "Command Prompt", and choose "Run as administrator". 



Step 2. Enter "sfc /scannow" (This process will take some time so don’t interrupt it)


If sfc/scannow doesn’t work for you, just try DISM scan Enter “DISM /Online /Cleanup-Image /RestoreHealth”(bear in mind that it also takes some time.)


Method 3. Create a Windows 10 installation Media

If method 2 can't fix Remote Desktop close immediately after login issue,  you can run Startup Repair to fix the system automatically. Here are the detailed steps. 

Step 1. Insert the installation CD/DVD to the PC and enter BIOS to boot from the installation CD/DVD.

Step 2. On the "Windows setup" page select the "Language to install", "Time and currency format“, and the ”Keyboard or input method" and click on "Next". 

Step 3. Click on "Repair your computer".


Step 4. Choose "Troubleshoot" click on "Advanced options", select "Startup Repair" and then “the operating system”.


Step 5. Remove the Windows installation CD/DVD, and reboot your PC from its system hard drive. Then, run RDP to see whether Remote Desktop can work normally after login. 

Method 4. Lower the display properties

Trying to lower the display properties is also another useful way to fix the issue.

Step 1. Go to Settings> System> Display> Display Resolution.


Step 2. Set resolution to low (800X600) 8bit.


Step 3. Navigation: Setting>Clipboard>Clipboard history. Turn “Clipboard history” off to disable the clipboard.


Note: Now you can find that Remote desktop connectivity can be more fluid because the resolution of the screen is reduced and the clipboard is disabled.

The final solution to Remote Desktop closes immediately after login

It’s time and energy-consuming to settle out RDP closes immediately after the login issue. If you want to connect to a remote computer easily, you can turn to a third-party remote connection software for Windows, AnyViewer.

It’s free, stable, and secure. With it, you can access computers from another computer anywhere, anytime. It’s compatible with all editions of 11/10/8.1/8/7 and Windows Server 2022/2019/2016/2012 R2 (64bit and 32bit), thus you don’t consider the Windows version of the computers. See how it works:

Step 1. Download and install AnyViewer on the host computer (the PC you want to control) and the client computer.

Download Freeware Win 11/10/8.1/8/7
Secure Download

Step 2. Open AnyViewer. On the client computer, input the device ID of the host computer and then click on “Connect”.


Step 3. Choose "Send a request to your partner" and click "OK".


Step 4. There will be a pop-up window on the host computer. You can control the host computer successfully if you are allowed.


Bonus Tip: However, nobody can allow the request if there is no one sitting in front of the host computer. Under this circumstance, you can set the security code to access the unattended computer

Step 1. Click on the “Settings” and “Recipient”, and select the third option to set the security you want.


Step 2. After the step “Connect” like the above, Choose “Input security code”, enter the security code you set before on the client computer, and then click on OK.


Note: The security code you set is permanent. And the Temporary security code in the main interface is generated by the software and it changes every time. You can choose one of them according to your necessity.


Now, I guess you already address RDP keeps closing issue through the above ways, like scanning, running Startup Repair, and so on. Of course, if all the ways cannot make sense for you, you can also try the third-party remote access software, AnyViewer, which can rapidly and safely solve your problem.