diff --git a/Build/Installer/Installer.nsi b/Build/Installer/Installer.nsi index 8fc405a4..cebb3e60 100644 --- a/Build/Installer/Installer.nsi +++ b/Build/Installer/Installer.nsi @@ -316,28 +316,6 @@ Function PageOptions Pop $R1 ${NSD_OnClick} $R1 PageOptionsBrowseOnClick - ; Set default directory - ${If} $InstallPortable == 1 - ${GetRoot} "$WINDIR" $0 - ${NSD_SetText} $R0 "$0\Rainmeter" - ${Else} - ; Disable Directory editbox and Browse button if already installed - SendMessage $R0 ${EM_SETREADONLY} 1 0 - - ${If} $INSTDIR != "" - EnableWindow $R1 0 - ${NSD_SetText} $R0 "$INSTDIR" - ${Else} - ; Fresh install - ${If} ${RunningX64} - ${NSD_SetText} $R0 "$PROGRAMFILES64\Rainmeter" - ${NSD_Check} $R2 - ${Else} - ${NSD_SetText} $R0 "$PROGRAMFILES\Rainmeter" - ${EndIf} - ${EndIf} - ${EndIf} - StrCpy $1 0 ${If} ${RunningX64} @@ -383,6 +361,28 @@ Function PageOptions ${NSD_CreateGroupBox} 0 42u -1u $1 "$(ADDITIONALOPTIONS)" ${EndIf} + ; Set default directory + ${If} $InstallPortable == 1 + ${GetRoot} "$WINDIR" $0 + ${NSD_SetText} $R0 "$0\Rainmeter" + ${Else} + ; Disable Directory editbox and Browse button if already installed + SendMessage $R0 ${EM_SETREADONLY} 1 0 + + ${If} $INSTDIR != "" + EnableWindow $R1 0 + ${NSD_SetText} $R0 "$INSTDIR" + ${Else} + ; Fresh install + ${If} ${RunningX64} + ${NSD_SetText} $R0 "$PROGRAMFILES64\Rainmeter" + ${NSD_Check} $R2 + ${Else} + ${NSD_SetText} $R0 "$PROGRAMFILES\Rainmeter" + ${EndIf} + ${EndIf} + ${EndIf} + ; Show UAC shield on Install button if requiredd GetDlgItem $0 $HWNDPARENT 1 ${If} $InstallPortable == 1