diff --git a/PowerEditor/installer/nppSetup.nsi b/PowerEditor/installer/nppSetup.nsi index 4bfd697ce..da17e5311 100644 --- a/PowerEditor/installer/nppSetup.nsi +++ b/PowerEditor/installer/nppSetup.nsi @@ -96,8 +96,6 @@ Function .onInit ${If} ${RunningX64} ; disable registry redirection (enable access to 64-bit portion of registry) SetRegView 64 - ; change install dir - StrCpy $INSTDIR "$PROGRAMFILES64\${APPNAME}" ; check if 32-bit version has been installed if yes, ask user to remove it IfFileExists $PROGRAMFILES\${APPNAME}\notepad++.exe 0 noDelete32 diff --git a/PowerEditor/installer/nsisInclude/gobalDef.nsh b/PowerEditor/installer/nsisInclude/gobalDef.nsh index c4749e118..93f987598 100644 --- a/PowerEditor/installer/nsisInclude/gobalDef.nsh +++ b/PowerEditor/installer/nsisInclude/gobalDef.nsh @@ -42,5 +42,11 @@ ; Main Install settings Name "${APPNAMEANDVERSION}" + +!ifdef ARCH64 +InstallDir "$PROGRAMFILES64\${APPNAME}" +!else InstallDir "$PROGRAMFILES\${APPNAME}" +!endif + InstallDirRegKey HKLM "Software\${APPNAME}" "" diff --git a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh index e17fc638f..3a21cf0e6 100644 --- a/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh +++ b/PowerEditor/installer/nsisInclude/mainSectionFuncs.nsh @@ -29,7 +29,6 @@ Var UPDATE_PATH Function setPathAndOptions ; Set Section properties SetOverwrite on - StrCpy $UPDATE_PATH $INSTDIR SetOutPath "$INSTDIR\"