From fe77e96629575d6cfc16f8a868f13af89c198d13 Mon Sep 17 00:00:00 2001
From: Eric StJohn <ericstj@microsoft.com>
Date: Mon, 13 Sep 2021 13:52:09 -0700
Subject: Don't set NativeMachine variables when IsWow64Process2 is unavailable

---
 src/ext/Util/ca/OsInfo.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/ext/Util')

diff --git a/src/ext/Util/ca/OsInfo.cpp b/src/ext/Util/ca/OsInfo.cpp
index eb76a3a0..3f91a9e5 100644
--- a/src/ext/Util/ca/OsInfo.cpp
+++ b/src/ext/Util/ca/OsInfo.cpp
@@ -506,7 +506,10 @@ extern "C" UINT __stdcall WixQueryNativeMachine(
     hr = ::ProcNativeMachine(::GetCurrentProcess(), &usNativeMachine);
     ExitOnFailure(hr, "Failed to get native machine value.");
 
-    WcaSetIntProperty(L"WIX_NATIVE_MACHINE", usNativeMachine);
+    if (hr != S_FALSE)
+    {
+        WcaSetIntProperty(L"WIX_NATIVE_MACHINE", usNativeMachine);
+    }
 
 LExit:
     if (FAILED(hr))
-- 
cgit v1.2.3-55-g6feb