Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieve Visual Studio 2017 (Enterprise) Key from privateregistry

I have bought a new SSD and want to reinstall Windows 10 and Visual Studio Enterprise 2017. The problem is, I got an "On the Hub" Account as a Student, on which you can get Microsoft Products for free, but now it seems that my Account has been removed since I left school a while ago, but my Keys still work (VS and as well Windows 10).

I did retrieve my Windows 10 Key from registry but since VS 2017 doesn’t store Keys in registry but in the privateregistry.bin file, i can’t seem to find the Key itself. The closest I got is adding the hive file in Regedit and looking into it.

RegEdit showing privateregistry But in the Registration, as well in the Licences folder are no real Keys saved.

Is there a possibility to retrieve it from somewhere in the hive or maybe can i just copy the privateregistry.bin file and add it into the Appdata folder after formatting? I didn’t wanted to format before I’m sure, so I don’t lose my license.

like image 690
SergSam Avatar asked Sep 30 '18 10:09

SergSam


People also ask

How do I find my Visual Studio Enterprise 2017 product key?

Sign in to your Visual Studio subscription. You must be signed in to download products or claim product keys. Select the Product Keys tab. Product keys are listed alphabetically by the name of the product.

Where can I find what license key was used in my installed copy of Visual Studio 2019?

If you go into regedit and browse to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Registration . The Product Key can be found in the ProductID Registry Key.

Where can I find Visual Studio license?

Go to Help menu and click on “About Microsoft Visual Studio”. From the opened dialog as shown below, click on “License Status”.


1 Answers

You should be able to find the activation key under the registry path HKEY_CLASSES_ROOT\Licenses\5C505A59-E312-4B89-9508-E162F8150517\08860 . The value is encrypted though, so you need to decrypt it with the CryptUnprotectData method in the Win32 API.

I have created a small tool that simplifies this and should allow extracting product keys for Visual Studio 2015, 2017 and 2019 (only tested for 2019 professional so far):

https://github.com/terjew/VSKeyExtractor

like image 126
wiesener Avatar answered Oct 05 '22 07:10

wiesener