Function .onVerifyInstDir
Hey guys. First off, thanks for all the help I received so far. My installer is almost complete.
I would like to use the .onVerifyInstDir function. However the code I’m using is causing the function to run every time the user changes even 1 letter of the install path. I would like it to only check the install dir. after they hit the "install" button, and return them to the Install Dir page to correct the path if not correct. Here is what I’m using:
;this is my directory page...
!insertmacro MUI_PAGE_DIRECTORY
;
;bunch of stuff here...
;
Function .onVerifyInstDir
IfFileExists "$INSTDIR\GPLoans\GPAdmin.exe" 0 NotInGP
goto End
NotInGP:
MessageBox MB_OK|MB_ICONEXCLAMATION "The installation directory you chose, $INSTDIR, is not valid, please choose another."
Abort
End:
FunctionEnd
I have read everything I can about .onVerifyInstDir in the help file and think that I’m missing something in regards to !ifdef, !ifndef, or gflag. However I just can't figure out these terms. Thanks for any help you all can lend.
Jnuw