I want to remove my license key in visual studio 2017. how can i do it? I am trying to change the product key but I cant.
Well I found two possible solutions for Visual Studio 2013, 2015, 2017, 2019 and 2022.
1. Setting new product key with StorePID.exe
(MS Docs).
- navigate to VS 2017/2019 installation directory (
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE
) - start
cmd
as admin - execute
StorePID.exe <your_new_product_key> <MPC>
- maybe a restart
Possible Microsoft Product Codes (MPC) are:
06177
Visual Studio Professional 201306191
Visual Studio Premium 201306181
Visual Studio Ultimate 201307062
Visual Studio Professional 201507060
Visual Studio Enterprise 201508860
Visual Studio Enterprise 201708862
Visual Studio Professional 201708866
Visual Studio Test Professional 201709260
Visual Studio Enterprise 201909262
Visual Studio Professional 201909660
Visual Studio Enterprise 202209662
Visual Studio Professional 2022
2. Removing product key first and set new one. (VS 2015/2017/2019)
- open register editor
- navigate to
- VS 2015:
HKEY_CLASSES_ROOT\Licenses\4D8CFBCB-2F6A-4AD2-BABF-10E28F6F2C8F
and delete it - VS 2017:
HKEY_CLASSES_ROOT\Licenses\5C505A59-E312-4B89-9508-E162F8150517
and delete it - VS 2019:
HKEY_CLASSES_ROOT\Licenses\41717607-F34E-432C-A138-A3CFD7E25CDA
and delete it
- exeute a repair installation of VS 2017/2019
- enter your new product key under Help > Register Product
It's not the best way to solve it, but faster than deinstall and install the complete IDE.
Update (2020-01-09)
- added MPCs for Visual Studio 2013, 2015 and 2019;
- extended registry solution for VS 2019;
Update (2021-12-03)
- added MPCs for Visual Studio 2022;
For VS 2019 the registry key is:
HKEY_CLASSES_ROOT\Licenses\41717607-F34E-432C-A138-A3CFD7E25CDA
can't write comments so I give you this in the form of an answer, hoping @ChW will incorporate it in his winning answer:
Removing product key first and set new one. (VS 2022)
open registry editor
navigate to
VS 2022: HKEY_CLASSES_ROOT\Licenses\1299B4B9-DFCC-476D-98F0-F65A2B46C96D and delete it
execute a repair installation of VS 2022
enter your new product key under Help > Register Product
For VS 2015, a key is
HKEY_CLASSES_ROOT\Licenses\4D8CFBCB-2F6A-4AD2-BABF-10E28F6F2C8F
for what it's worth...
MPCs for VS 2019.
Visual Studio Enterprise 2019 09260
Visual Studio Professional 2019 09262
MPCs for VS 2022
Visual Studio Enterprise 2022 09660
Visual Studio Professional 2022 09662
© 2022 - 2025 — McMap. All rights reserved.