From f1cf3f0eeb28ba0f8207a1f94e3d9b3f27ea1e10 Mon Sep 17 00:00:00 2001
From: Simon Rozman <simon@rozman.si>
Date: Sat, 9 Nov 2019 19:13:30 +0100
Subject: [PATCH] installer: Refine the WoW64 decision logic

The registry and file reflection is also present on ARM64 platform.
Therefore, the reflection logic should resemble `${RunningX64} ||
${RunningArm64}` or `${IsWow64}` or `!${RunningX86}` for short.

Signed-off-by: Simon Rozman <simon@rozman.si>
---
 installer/tap-windows6.nsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/installer/tap-windows6.nsi b/installer/tap-windows6.nsi
index 470d554..5c0ebca 100755
--- a/installer/tap-windows6.nsi
+++ b/installer/tap-windows6.nsi
@@ -202,7 +202,7 @@ ${EndIf}
 	!insertmacro MULTIUSER_INIT
 	SetShellVarContext all
 
-	${If} ${RunningX64}
+	${If} ${IsWow64}
 		SetRegView 64
 		StrCpy $INSTDIR "$PROGRAMFILES64\${PRODUCT_NAME}"
 	${Else}
@@ -315,7 +315,7 @@ Function un.onInit
 	ClearErrors
 	!insertmacro MULTIUSER_UNINIT
 	SetShellVarContext all
-	${If} ${RunningX64}
+	${If} ${IsWow64}
 		SetRegView 64
 	${EndIf}
 FunctionEnd