From d635be9432acf16e781a122a9e7f77df56458467 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Sat, 28 Jul 2012 19:31:18 +0000 Subject: [PATCH] Feature #3296 - Windows installer should check OS architecture --- res/avgtb.nsh | 2 +- res/synergy.nsh | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/res/avgtb.nsh b/res/avgtb.nsh index 0960e581..6fd205b7 100644 --- a/res/avgtb.nsh +++ b/res/avgtb.nsh @@ -25,7 +25,7 @@ var avgInstallHomepage var avgImage var avgImageHandle -Function .onInit +Function avgInit InitPluginsDir File /oname=$PLUGINSDIR\avgtb.bmp "..\res\avgtb.bmp" diff --git a/res/synergy.nsh b/res/synergy.nsh index 6dc4311b..2763020e 100644 --- a/res/synergy.nsh +++ b/res/synergy.nsh @@ -84,6 +84,21 @@ InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${product}" "" !macroend +Function .onInit + IfFileExists $WINDIR\SYSWOW64\*.* end is32bit + +is32bit: + ${If} ${arch} == "x64" + MessageBox MB_OK "It is not possible to use the 64-bit Synergy installer \ + on a 32-bit system. Please download the 32-bit Synergy installer." + Abort + ${EndIf} +end: + + Call avgInit + +FunctionEnd + Section SetShellVarContext all