Archive: Activate the button "next" in a script


Activate the button "next" in a script
Hello
To create an installation of my application I use a script "nsis". During installation the user must specify the installation directory of "SMPlayer" (via a browse).
The "Next" button is only activated when the user selects a location. Is it possible to activate this "next button" even if the user does not select a location

the code i'm using :

define MUI_DIRECTORYPAGE_VARIABLE  $Mplayervar
!define MUI_PAGE_HEADER_TEXT $(HEADER_TEXT)
!define MUI_PAGE_HEADER_SUBTEXT $(HEADER_SUBTEXT)
!define MUI_DIRECTORYPAGE_TEXT_TOP $(TEXT_TOP)
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION $(TEXT_DESTINATION)
!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfPath

!insertmacro MUI_PAGE_DIRECTORY


thank you

GetDlgItem $0 $HWNDPARENT 1
EnableWindow $0 1


Thank you for the reply. I tried your proposition but it does not work. i inserted it in the function "confpath" like that:

Function ConfPath
GetDlgItem $0 $HWNDPARENT 1
EnableWindow $0 1
FunctionEnd

the "next button" remains disabled :(


In the pre function the page isn't created yet, so there's nothing to enable/disable. You must do it in the show function.

But keep in mind that the DIRECTORY page automagically enables/disables the Next button depending on free HDD space, valid path, etc. So it'll override your enabling anyway. You can probably use .onVerifyInstDir to force it enabled.


Edit: Actually, there's a much easier way to do this. MUI_DIRECTORYPAGE_VERIFYONLEAVE.


thank you very much.it works.