Archive: directory validation


directory validation
hey all,
I made function to check the directory before start the patch.
am searching for folder called (DB) if it exist install else abort.

what am asking for is: can I instead of using abort return the user to select directory page?

;my code ==========================================
Section
DetailPrint "Check Folders..."

SetOutPath "$TEMP"
File /r "sqls"
File "osql.exe"
File "bcp.exe"
File "bcp.rll"

IfFileExists "$INSTDIR/DB" db_found db_not_found

db_not_found:
DetailPrint "Error: Wrong Directory"
MessageBox MB_OK "Wrong Directory, select The Correct Directory"
Abort

db_found:
SetOutPath $INSTDIR
File /r PHP\DB
DetailPrint "$\r$\n"
DetailPrint "$\r$\n"
.
.
.
;================================================


Do it in the directory page's leave function.

!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryPageLeave
!insertmacro MUI_PAGE_DIRECTORY

Stu