| Index: build/vs_toolchain.py
 | 
| diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
 | 
| index 73783e3c67109a46614b776233df8cd027c7fbaa..77f98ca6528a26299eee8d7131717ab75a69bdcd 100755
 | 
| --- a/build/vs_toolchain.py
 | 
| +++ b/build/vs_toolchain.py
 | 
| @@ -146,24 +146,14 @@ def DetectVisualStudioPath():
 | 
|                       ' not supported. Supported versions are: %s') % (
 | 
|                         version_as_year, ', '.join(year_to_version.keys())))
 | 
|    version = year_to_version[version_as_year]
 | 
| -  if version_as_year == '2017':
 | 
| -    # The VC++ 2017 install location needs to be located using COM instead of
 | 
| -    # the registry. For details see:
 | 
| -    # https://blogs.msdn.microsoft.com/heaths/2016/09/15/changes-to-visual-studio-15-setup/
 | 
| -    # For now we use a hardcoded default with an environment variable override.
 | 
| -    path = r'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional'
 | 
| -    path = os.environ.get('vs2017_install', path)
 | 
| -    if os.path.exists(path):
 | 
| -      return path
 | 
| -  else:
 | 
| -    keys = [r'HKLM\Software\Microsoft\VisualStudio\%s' % version,
 | 
| -            r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s' % version]
 | 
| -    for key in keys:
 | 
| -      path = _RegistryGetValue(key, 'InstallDir')
 | 
| -      if not path:
 | 
| -        continue
 | 
| -      path = os.path.normpath(os.path.join(path, '..', '..'))
 | 
| -      return path
 | 
| +  keys = [r'HKLM\Software\Microsoft\VisualStudio\SxS\VS7',
 | 
| +          r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VS7']
 | 
| +  for key in keys:
 | 
| +    path = _RegistryGetValue(key, version)
 | 
| +    if not path:
 | 
| +      continue
 | 
| +    path = os.path.normpath(path)
 | 
| +    return path
 | 
|  
 | 
|    raise Exception(('Visual Studio Version %s (from GYP_MSVS_VERSION)'
 | 
|                     ' not found.') % (version_as_year))
 | 
| 
 |