Created
February 24, 2018 19:19
-
-
Save vilbeyli/6b0f5bd319392db52d45d3eb0ef01583 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import winreg | |
| import os | |
| VS_REG_PATH = r"SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7" | |
| def GetVS2017Path(): | |
| vs_registry_key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, VS_REG_PATH, 0, winreg.KEY_READ) | |
| value, regtype = winreg.QueryValueEx(vs_registry_key, "15.0") | |
| winreg.CloseKey(vs_registry_key) | |
| return value | |
| print GetVS2017Path() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment