Archive: VERIFYONLEAVE help


VERIFYONLEAVE help
Hi,

I am working with the ModernUI Directory page and I am trying to use the MUI_DIRECTORYPAGE_VERIFYONLEAVE setting. I feel like I am completely missing something, because it seems so simple, yet I can't get it to work. I haven't found much documentation on this functionality. Here is some of the code:

!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPre
!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShow
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeave
!define MUI_DIRECTORYPAGE_TEXT_TOP "(SOME TEXT HERE)"
!define MUI_DIRECTORYPAGE_VERIFYONLEAVE
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
...
Function DirectoryLeave

GetInstDirError $R0
MessageBox MB_OK $R0
...

$R0 always displays as '0', no matter what file path I type in. Maybe I am mis-understanding how this function works?

Thanks in advance for your help,

-Mike


As long as the path is valid, it'd always return 0. Try leaving it empty and hitting the next button or inputting an invalid path like "blah".


Oh, I see it now. Sorry, I had only tried modifying the default path (eg. changing 'C:\Program Files\NSIS\' to 'C:\Program Blah\NSIS\') and was getting a 0. When I try a blank path or just type in blah, I get a 1.

Thanks kichik!