@@ -77,6 +77,8 @@ private enum BuildDeployTab
77
77
78
78
private const string WINDOWS_10_KITS_PATH_REGISTRY_PATH = @"SOFTWARE\Microsoft\Windows Kits\Installed Roots" ;
79
79
80
+ private const string WINDOWS_10_KITS_PATH_ALTERNATE_REGISTRY_PATH = @"SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots" ;
81
+
80
82
private const string WINDOWS_10_KITS_PATH_REGISTRY_KEY = "KitsRoot10" ;
81
83
82
84
private const string WINDOWS_10_KITS_PATH_POSTFIX = "Lib" ;
@@ -1419,11 +1421,24 @@ private void LoadWindowsSdkPaths()
1419
1421
// Try to detect the installation path by checking the registry.
1420
1422
try
1421
1423
{
1422
- var registryKey = Microsoft . Win32 . Registry . LocalMachine . OpenSubKey ( WINDOWS_10_KITS_PATH_REGISTRY_PATH ) ;
1424
+ var registryKey = Win32 . Registry . LocalMachine . OpenSubKey ( WINDOWS_10_KITS_PATH_REGISTRY_PATH ) ;
1423
1425
var registryValue = registryKey . GetValue ( WINDOWS_10_KITS_PATH_REGISTRY_KEY ) as string ;
1424
1426
win10KitsPath = Path . Combine ( registryValue , WINDOWS_10_KITS_PATH_POSTFIX ) ;
1427
+
1428
+ if ( ! Directory . Exists ( win10KitsPath ) )
1429
+ {
1430
+ registryKey = Win32 . Registry . LocalMachine . OpenSubKey ( WINDOWS_10_KITS_PATH_ALTERNATE_REGISTRY_PATH ) ;
1431
+ registryValue = registryKey . GetValue ( WINDOWS_10_KITS_PATH_REGISTRY_KEY ) as string ;
1432
+ win10KitsPath = Path . Combine ( registryValue , WINDOWS_10_KITS_PATH_POSTFIX ) ;
1433
+
1434
+ if ( ! Directory . Exists ( win10KitsPath ) )
1435
+ {
1436
+ Debug . LogWarning ( $ "Could not find the Windows 10 SDK installation path via registry. Reverting to default path.") ;
1437
+ win10KitsPath = WINDOWS_10_KITS_DEFAULT_PATH ;
1438
+ }
1439
+ }
1425
1440
}
1426
- catch ( System . Exception e )
1441
+ catch ( Exception e )
1427
1442
{
1428
1443
Debug . LogWarning ( $ "Could not find the Windows 10 SDK installation path via registry. Reverting to default path. { e } ") ;
1429
1444
win10KitsPath = WINDOWS_10_KITS_DEFAULT_PATH ;
0 commit comments