MUI_PAGE_CUSTOMFUNCTION on Windows Vista
Hi all,
I've created an installer which has a custom function call upon leaving a page in the installation progress.
This is to check if the chosen directory exists already and/or is empty.
This works fine on Windows XP, but on Vista the function is called and executed, but then the installation does not continue. Without this custom function the installation does work on Vista, too.
Here is my code:
Any help would be appreciated.insertmacro MUI_PAGE_WELCOME
|MB_ICONQUESTION "Installation directory $INSTDIR is not empty. Setup will delete all existing files.$\n$\nPress OK to continue anyway, or press CANCEL to choose another directory." IDOK _ok
>!define MUI_PAGE_CUSTOMFUNCTION_LEAVE "DirectoryLeave"
>!insertmacro MUI_PAGE_DIRECTORY
>!insertmacro MUI_PAGE_INSTFILES
>!insertmacro MUI_PAGE_FINISH
>***91;...***93;
Function DirectoryLeave
${DirState} "$INSTDIR" $R0
StrCmp $R0 1 0+2
MessageBox MB_OKCANCEL
Abort
_ok:
Delete "$INSTDIR\*.*"
>FunctionEnd
>