@@ -77,6 +77,8 @@ private enum BuildDeployTab
7777
7878 private const string WINDOWS_10_KITS_PATH_REGISTRY_PATH = @"SOFTWARE\Microsoft\Windows Kits\Installed Roots" ;
7979
80+ private const string WINDOWS_10_KITS_PATH_ALTERNATE_REGISTRY_PATH = @"SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots" ;
81+
8082 private const string WINDOWS_10_KITS_PATH_REGISTRY_KEY = "KitsRoot10" ;
8183
8284 private const string WINDOWS_10_KITS_PATH_POSTFIX = "Lib" ;
@@ -1419,11 +1421,24 @@ private void LoadWindowsSdkPaths()
14191421 // Try to detect the installation path by checking the registry.
14201422 try
14211423 {
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 ) ;
14231425 var registryValue = registryKey . GetValue ( WINDOWS_10_KITS_PATH_REGISTRY_KEY ) as string ;
14241426 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+ }
14251440 }
1426- catch ( System . Exception e )
1441+ catch ( Exception e )
14271442 {
14281443 Debug . LogWarning ( $ "Could not find the Windows 10 SDK installation path via registry. Reverting to default path. { e } ") ;
14291444 win10KitsPath = WINDOWS_10_KITS_DEFAULT_PATH ;
0 commit comments