From 03daf5559e3eb0f8554f841a53347013236413d1 Mon Sep 17 00:00:00 2001 From: Don HO Date: Sat, 8 Dec 2018 17:33:03 +0100 Subject: [PATCH] Make installer more coherent for the option doLocalConf.xml If the install path is under %PROGRAMFILE% then option to copy doLocalConf.xml will be unchecked and disabled. --- PowerEditor/installer/nsisInclude/tools.nsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PowerEditor/installer/nsisInclude/tools.nsh b/PowerEditor/installer/nsisInclude/tools.nsh index 2ee287e4..b5f762d1 100644 --- a/PowerEditor/installer/nsisInclude/tools.nsh +++ b/PowerEditor/installer/nsisInclude/tools.nsh @@ -102,6 +102,18 @@ Function ExtraOptions Pop $NoUserDataCheckboxHandle ${NSD_OnClick} $NoUserDataCheckboxHandle OnChange_NoUserDataCheckBox + StrLen $0 $PROGRAMFILES + StrCpy $1 $InstDir $0 + + StrLen $0 $PROGRAMFILES64 + StrCpy $2 $$InstDir "" $0 + ${If} $1 == "$PROGRAMFILES" + ${ORIF} $2 == "$PROGRAMFILES64" + ${NSD_Uncheck} $NoUserDataCheckboxHandle + EnableWindow $NoUserDataCheckboxHandle 0 + ${Else} + EnableWindow $NoUserDataCheckboxHandle 1 + ${EndIf} nsDialogs::Show FunctionEnd