Fix Installer for 64-bit fails with argument "/D"

This commit is contained in:
Don Ho 2016-10-31 02:22:08 +01:00
parent c58043ea0d
commit 80092ea90c
3 changed files with 6 additions and 3 deletions

View File

@ -96,8 +96,6 @@ Function .onInit
${If} ${RunningX64} ${If} ${RunningX64}
; 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 install dir
StrCpy $INSTDIR "$PROGRAMFILES64\${APPNAME}"
; 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

View File

@ -42,5 +42,11 @@
; 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}" ""

View File

@ -29,7 +29,6 @@ Var UPDATE_PATH
Function setPathAndOptions Function setPathAndOptions
; Set Section properties ; Set Section properties
SetOverwrite on SetOverwrite on
StrCpy $UPDATE_PATH $INSTDIR StrCpy $UPDATE_PATH $INSTDIR
SetOutPath "$INSTDIR\" SetOutPath "$INSTDIR\"