Fix The Remote Computer Disconnected the session because of an error in the Licensing protocol in Windows Vista. If you have this problem in Windows XP Pro / Windows XP, read this post : Fix MSLicensing Protocol Error in Windows XP.

The procedure to fix this issue is almost similar to the one described for fixing it on Windows XP, except for one extra step. Here’s the step-by-step process :

1> Click on Start Menu –> Go to Run Command box –> Type regedit –> This opens the registry Editor.

2> Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing

How to fix -  The Remote Computer Disconnected the session because of an error in the Licensing protocol

3> Delete all the keys under MSLicensing : both HardwareID and Store keys and their subkeys. If you are not sure how to delete the key and its subkeys, just rename them as follows : HardwareID to HardwareID-temp and Store to Store-temp.

4> Reboot the system.

5> After rebooting (ensure you are logged in as administrator), click on ‘Start‘ menu–> ‘Programs / All programs‘ –> Accessories

6> Right Click on Remote Desktop Connection and select the option “Run as Administrator“.  This will recreate new Keys Hardware ID and Store under MSLicensing.

7> If you had renamed the keys and subkeys instead of deleting them, navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing and you’ll notice the two newly folders created – HardwareID and Store. Delete the old HardwareID-temp and Store-temp and close the registry editor.

This solves the problem and you will be able to connect to remote servers using Remote Desktop Connection.

Related post:

If you use a MAC, read this post: you were disconnected from the windows-based computer because of problems during the licensing protocol.


  1. I tried all these
    I suggest you temporary disable the antivirus programs on Windows 7 computers. If the issue persists, please open IE, click Tools->Manage Add-ons. Disable all add-ons that are from your security programs.
    If the issue still occurs, follow the steps below to reset IE settings.
    1. Click Start, please type “inetcpl.cpl” (without quotation marks) in the Start Search bar and press Enter to open the Internet options window.
    2. Switch to the Advanced tab.
    3. Click the “Reset Internet Explorer Settings” button.
    4. Click Reset to confirm the operation.
    5. Click Close when the resetting process has finished.
    6. Uncheck the “Enable third-party browser extensions” option in the Settings box.
    7. Click Apply, click OK.
    If it does not work either, you may try to following method.
    1. In Internet Explorer, click Internet Options on the Tools menu.
    2. On the Security tab, click Trusted sites.
    3. Click Sites.
    4. In the Add this Web site to this zone box, type the address for the licensing server. If the server (or your computer) is not configured to use SSL, click to clear the Require server verification (https:) for all sites in this zone check box.
    5. Click Add, and then click OK.
    6. Click OK.
    If the above suggestions do not help, I suggest you turn off Protected Mode in IE.

    still no change.

  2. @Pavithra – If you are the admin, then you should get ‘Run as Administrator’ option. I wonder why you are not getting that. Let me see if I can find more info on this.

  3. no, i checked my computer settings, i am the admin. it is my personal laptop. still i am facing the trouble. tried creating a new mslicensing folder with and without subfolders, restarted multiple times….nothing helps. Please tell me if there is a solution.

  4. @Pavithra – If you do not see the option “Run as Administrator”, then I guess administrator facilities have been turned off for you. You are most likely using your office laptop, where in such features will be disabled.

    The only solution I can think about is to take help of your system administrator or any other person as such who is responsible for maintaining your laptop. Ask them to login with Administrator permissions, and then follow the instructions step-by-step. That’ll solve the problem.

  5. I have a windows 7 and I tried all possible solution of removing MSlicensing folder. I do not have a copy of that folder. Tried disabling Anti-virus…etc…nothing works for my RDP file. Please guide me through to correct and connect to my Remote desktop. I do not see the option of Run as Administrator when I right click it.I am getting the error as “the remote computer disconnected the session due to an error in the licensing”

    Please help me as I need to work on the remote server. I am not aware what the problem is.

  6. Thanks very much for your post. I had been troubleshooting for awhile and found that all I had to do was run RDP client as administrator to create the MSLicensing keys. Kept thinking it was something on the server side but turned out to be my client.

  7. @Nan – When you click on ‘Run as administrator’, please check if it’s creating MSLicensing key. If it’s not, then you can try creating it on your own, this way we can only hope it’ll work. We cannot be sure about it.

  8. My vista is 32 bit. These are the steps I tried.

    Deleted both the hardwareID and store entry under MSLicensing. Right clicked on remote desktop and selected run as administrator, still not connecting.

    I do log into VPN first. This is so frustrating.

  9. I am running VISTA home and I did try running as admin. I can’t check this on any of my Windows 7 computer, because this client doesn’t have their servers or VPN, not sure which, configured to let us use Windows 7 yet.

  10. I have tried everything I can find and nothing is working. After I delete the registry entries and reboot, what should be there? I haven’t been able to work for a day because of this and my client isn’t any help.

  11. Thanks, The one critical step I was missing was to “Run as Admin” so that my Win 7 RDC would rebuild the keys…
    Again Thank You!

  12. Thanks, “Run as Administrator” worked for my frustrated user. I was out of ideas. I used it on a Vista Home edition.

    Thanks, Thanks, Thanks.

  13. Thanks, “Run as Administrator” worked for two users of mine. I was out of ideas. Thanks, Thanks, Thanks.

  14. @Karlo – when i try connecting to an older system from Vista it’s working fine for me. Right now I do not have a Win 7 machine to check if it is a generic problem or a one off. Meanwhile, let me try to find a solution for you from elsewhere. If you figure out any solution please update me with the same.


  15. Hi

    I have this problemn on a Win7 32 bit only contetting to a old Win200 Terminal Server.

    I tryed to rebuild the registry keys, but it did not fix the prolblem.

    Connect to RDP service on Win2003/Win2008 server is working fine.

    Any idea?



  16. I’m sorry but I still have the problem. The case is, that I don’t even have this folder called “MSLicensing” under the shown directory. I use Vista Hope Premium. Any suggestions?