Fix x64 installer install in "C:\Program Files (x86)" regression
This commit is contained in:
parent
5af1c055d1
commit
e6fad9bd4f
|
@ -37,7 +37,7 @@ SetCompressor /SOLID lzma ; This reduces installer size by approx 30~35%
|
||||||
|
|
||||||
|
|
||||||
!include "nsisInclude\winVer.nsh"
|
!include "nsisInclude\winVer.nsh"
|
||||||
!include "nsisInclude\gobalDef.nsh"
|
!include "nsisInclude\globalDef.nsh"
|
||||||
!include "nsisInclude\tools.nsh"
|
!include "nsisInclude\tools.nsh"
|
||||||
!include "nsisInclude\uninstall.nsh"
|
!include "nsisInclude\uninstall.nsh"
|
||||||
|
|
||||||
|
@ -98,6 +98,16 @@ Function .onInit
|
||||||
; disable registry redirection (enable access to 64-bit portion of registry)
|
; disable registry redirection (enable access to 64-bit portion of registry)
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
|
|
||||||
|
; change to x64 install dir if needed
|
||||||
|
${If} "$InstDir" != ""
|
||||||
|
${If} "$InstDir" == "$PROGRAMFILES\${APPNAME}"
|
||||||
|
StrCpy $INSTDIR "$PROGRAMFILES64\${APPNAME}"
|
||||||
|
${EndIf}
|
||||||
|
; else /D was used or last installation is not "$PROGRAMFILES\${APPNAME}"
|
||||||
|
${Else}
|
||||||
|
StrCpy $INSTDIR "$PROGRAMFILES64\${APPNAME}"
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
; check if 32-bit version has been installed if yes, ask user to remove it
|
; check if 32-bit version has been installed if yes, ask user to remove it
|
||||||
IfFileExists $PROGRAMFILES\${APPNAME}\notepad++.exe 0 noDelete32
|
IfFileExists $PROGRAMFILES\${APPNAME}\notepad++.exe 0 noDelete32
|
||||||
MessageBox MB_YESNO "You're installing 64-bit version. 32-bit version has been installed. Remove it?$\n(Your custom config files will be kept)" /SD IDYES IDYES doDelete32 IDNO noDelete32 ;IDYES remove
|
MessageBox MB_YESNO "You're installing 64-bit version. 32-bit version has been installed. Remove it?$\n(Your custom config files will be kept)" /SD IDYES IDYES doDelete32 IDNO noDelete32 ;IDYES remove
|
||||||
|
|
|
@ -43,10 +43,6 @@
|
||||||
; Main Install settings
|
; Main Install settings
|
||||||
Name "${APPNAMEANDVERSION}"
|
Name "${APPNAMEANDVERSION}"
|
||||||
|
|
||||||
!ifdef ARCH64
|
|
||||||
InstallDir "$PROGRAMFILES64\${APPNAME}"
|
|
||||||
!else
|
|
||||||
InstallDir "$PROGRAMFILES\${APPNAME}"
|
InstallDir "$PROGRAMFILES\${APPNAME}"
|
||||||
!endif
|
|
||||||
|
|
||||||
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
Loading…
Reference in New Issue