Possible resolution for invalid license data errors after installing Visual Studio 2008


I have heard from a few customers who have installed Visual Studio 2008 and then seen a dialog appear stating “Invalid license data. Reinstall is required.” when attempting to launch the IDE.  The dialog looks like the following:

Pressing OK on this dialog dismisses the IDE and VS 2008 is not usable.

There are a couple of cases where registry data can be orphaned on the machine that causes this type of error.  Unfortunately, running a repair of VS 2008 will not correctly fix the registry values that control this functionality in most cases.

The following steps can be used to resolve most instances of this Invalid license data error message:

  1. Uninstall the Visual Studio 2008 product that you have installed.  You only have to uninstall the main Visual Studio product entry in Add or Remove Programs, and you can leave the other pieces installed by Visual Studio setup (such as the .NET Framework 3.5, MSDN, SQL Express, etc) alone.  The product name in Add or Remove Programs that you want to uninstall is dependent on the VS 2008 edition you have installed.  For example, for the English Professional edition, the product name will be “Microsoft Visual Studio 2008 Professional – ENU”
  2. Click on Start, choose Run and type cmd
  3. Copy and paste each of the following commands into the cmd prompt to clean up orphaned Visual Studio licensing data in your registry:
  4. reg delete HKCR\Licenses\21B7CDC0-21A6-4fa8-8CE5-F6A6B2B60839 /f
    reg delete HKCR\Licenses\2AC5863D-48B9-490c-ACD3-B7723A1FEB9E /f
    reg delete HKCR\Licenses\45D0AA33-5564-4a89-BE94-C1972EF4658C /f
    reg delete HKCR\Licenses\46D504D7-557F-4C19-A4DD-6605411EF496 /f
    reg delete HKCR\Licenses\743A8267-4958-460e-B757-7110EED3D53C /f
    reg delete HKCR\Licenses\82198EB8-0FAB-4b2b-98AD-F745A8566EFE /f
    reg delete HKCR\Licenses\AEA64E56-7C97-4a1c-8974-4E0BB4E48FCD /f
    reg delete HKCR\Licenses\B2825A63-A482-4032-80E6-42C9D2C1A78B /f
    reg delete HKCR\Licenses\BA32367F-28F8-4AEA-848D-95AE438B3B9C /f
    reg delete HKCR\Licenses\F2E1F428-5B9A-4a69-B1F4-28C3C644168A /f

  5. If you are installing on a 64-bit OS, copy and paste each of the following commands into the cmd prompt to clean up orphaned Visual Studio licensing data in your registry:
  6. reg delete HKCR\Wow6432Node\Licenses\21B7CDC0-21A6-4fa8-8CE5-F6A6B2B60839 /f
    reg delete HKCR\Wow6432Node\Licenses\2AC5863D-48B9-490c-ACD3-B7723A1FEB9E /f
    reg delete HKCR\Wow6432Node\Licenses\45D0AA33-5564-4a89-BE94-C1972EF4658C /f
    reg delete HKCR\Wow6432Node\Licenses\46D504D7-557F-4C19-A4DD-6605411EF496 /f
    reg delete HKCR\Wow6432Node\Licenses\743A8267-4958-460e-B757-7110EED3D53C /f
    reg delete HKCR\Wow6432Node\Licenses\82198EB8-0FAB-4b2b-98AD-F745A8566EFE /f
    reg delete HKCR\Wow6432Node\Licenses\AEA64E56-7C97-4a1c-8974-4E0BB4E48FCD /f
    reg delete HKCR\Wow6432Node\Licenses\B2825A63-A482-4032-80E6-42C9D2C1A78B /f
    reg delete HKCR\Wow6432Node\Licenses\BA32367F-28F8-4AEA-848D-95AE438B3B9C /f
    reg delete HKCR\Wow6432Node\Licenses\F2E1F428-5B9A-4a69-B1F4-28C3C644168A /f

  7. Re-install the Visual Studio 2008 product that you uninstalled in step 1 above

After doing this, the license data should be recreated and correct and allow you to launch the VS 2008 IDE.

Comments (18)

  1. daniel_lidstrom says:

    What causes this in the first place? I’m currently experiencing this and it is taking a long time to fix. I’d like to know how to avoid this in the future.

    Thanks in advance!

  2. astebner says:

    Hi Daniel_lidstrom – The only cases I’ve seen where this error has happened are the following:

    1.  A beta uninstall that didn’t work correctly

    2.  Manual changes made to the registry

    I’m guessing there could be other causes, but I haven’t been able to track any others down yet.  I’m sorry for the hassles that this has caused for you.

  3. daniel_lidstrom says:

    Thanks for the answer. I have everything up and running again. Actually when I tried to clear the registry entries it turned out they didn’t exist, strangely enough. A re-install was all that was needed.

  4. jenna_h says:

    I also have this problem, so I uninstalled Visual Studio and then ran the reg deletes you have above, but they weren’t there.

    Then I reinstalled, and I’m still getting the same error. What else can I do to make this work? I just bought this 3 days ago, and would really like to start using it.

    P.S.

    1. I’m running Vista Home Premium.

    2. I did not have a beta install of Visual Studio 2008 on here. I did try installing Visual Studio 2003, which wouldn’t work at all (and then I found out it isn’t supported on Vista, and so uninstalled it).

    3. I did not make manual changes to the registry in this area. I did just change the registry to disable IPv6 and to disable the BROADCAST flag for DHCP because I’m also have really slow issues with using the internet.

  5. jenna_h says:

    I fixed my problem–I had to change the permissions on the HKCRLicenses folder in the registry because I was denied access.

    I have User Account Control off, but I also didn’t run the VS 2008 setup explicitly as Administrator. Maybe that would’ve helped.

    Anyway, once I changed the permissions of the folder, uninstalled VS 2008, rebooted, reinstalled, the IDE opened correctly.

  6. mj79 says:

    Okay I’ve similar situation on Vista Ultimate 32 bit machine. I installed VS 2008 on my home network on bunch of machines and uninstalled it as I was playing with different OS. I’ve VS 2008 professional thru my past MSDN subscription. I tried doing install on my desktop which runs 32 bit Vista ultimate and after successful install I got the Invalid license data error. I tried to apply the regedit fix but seems none of registry key exists on my machine. HKCRLicesnes is not a valid folder on my machine. Is Vista managing licenses in different folder ?

  7. astebner says:

    Hi Mj79 – Visual Studio uses the same HKEY_CLASSES_ROOTLicenses key on all operating systems, including Vista.  Note that in your comment above, you spelled the word "Licesnes" incorrectly, so maybe that is the cause of not being able to find it?  Also, on Vista, you need to make sure that you run the reg delete commands listed above from an elevated cmd prompt, or else you won’t have the necessary permissions to remove any of those keys.

  8. Guido73 says:

    I have exactly the same problem with VS 2008 on an Windows Server 2008 x64 system, but the registry keys are not found under HKCRLicenses and HKCRWow6432NodeLicenses.

    I uninstalled and installed VS several times, but I always get this license-message.

    Do you might have an idea what I can do?

  9. Bruce McGoose says:

    I have the same problem as jenna_h

    but I can’t figure out how to change the licenses folder permissions

    has no permissions set

    so don’t have permission to change it :/

    any ideas?

  10. astebner says:

    Hi Bruce McGoose – If that registry key has no permissions at all, that should mean that everyone has full control for that key and you can add individual permissions as needed.  Can you take a look at the blog post at http://www.brianpeek.com/blog/archive/2007/11/29/weird-vista-registry-issue.aspx and see if it helps solve this permission issue on your system?

  11. Bruce McGoose says:

    Heh I sorted out that.. wasn’t the problem

    I’ve uninstalled everything

    checked any registry problems

    enabled the administrator account and installed it from there

    but still.. got the same problem 🙁

  12. astebner says:

    Hi Bruce McGoose – I’m sorry but I don’t know what to suggest if you’ve verified that you don’t have any of the above registry values and then tried to re-install VS.  You may want to post a question on one of the Visual Studio forums at http://forums.microsoft.com to see if anyone can help you there.  Also, you may want to report a bug on this issue on the Connect site at http://connect.microsoft.com/visualstudio/.  Finally, you may want to contact Microsoft technical support for more in-depth troubleshooting assistance.  You can find contact information at http://support.microsoft.com.

    I’m sorry I haven’t been able to be more helpful in this scenario.

  13. eastwest says:

    Hi all, first time post.

    I’m using vs2005 and having the same problem where invalid license message appear. The message appear after I change my login name account for my pc (my pc connect to a domain). In this case, I just transfer all files in documents and settings folder to the new account folder. using this step, some application works normally, some need to do reconfiguration again.

    So, can this be considered as one of the causes for the "invalid license" problem?

  14. astebner says:

    Hi Eastwest – I haven’t heard of this scenario you describe being a cause of invalid license data errors in the past.  The registry values listed in this blog post are all per-machine values and not per-user values, so it shouldn’t matter which user you are logged in with.  However, Visual Studio does have some per-user data that needs to be reconfigured each time a new user logs in on the system.  I thought that would happen automatically though and not require you to manually copy any files from one folder to the other.

    Thanks for letting me know about this possible cause for this issue.

  15. cenko says:

    Before applying the workaround, try restarting your PC first. This somehow corrects the problem on some machines.

  16. RajG says:

    Restarting PC first time didn’t work, but when I restarted second time it worked… very strange, but i don’t mind as I wasn’t forced to reinstall VS