Skip to content

Commit 5b96f54

Browse files
authored
bugfix: x64 build of cppwinrt can't locate SDK (#803)
1 parent ec6a001 commit 5b96f54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cppwinrt/cmd_reader.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ namespace cppwinrt
137137
HKEY_LOCAL_MACHINE,
138138
L"SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots",
139139
0,
140-
KEY_READ,
140+
// https://task.ms/29349404 - The SDK sometimes stores the 64 bit location into KitsRoot10 which is wrong,
141+
// this breaks 64-bit cppwinrt.exe, so work around this by forcing to use the WoW64 hive.
142+
KEY_READ | KEY_WOW64_32KEY,
141143
&key))
142144
{
143145
throw std::invalid_argument("Could not find the Windows SDK in the registry");

0 commit comments

Comments
 (0)