Archive: Install permission /need answer!


Install permission /need answer!
I've made EXE-replacing installer (graphics patch, *not* crack).
To relace EXE user must locate game's folder containing original EXE (by using the Browse button). When he locates it, he clicks Install and everything is OK. But here's my question: Can I disable Isntall button if specified directory do not contains original EXE? (EXE to replace) :rolleyes:
Please help! Its important!


Use the .onVerifyInstDir callback function.


Rather than disable it, it would probably be better to have a message box stating why the user cannot click the Install/Next button.
Something like this:

!define MUI_PAGE_CUSTOMFUNCTION_LEAVE "checkPath"
!insertmacro MUI_PAGE_DIRECTORY

Function "checkPath"
IfFileExists "$INSTDIR\executable.exe" +3
MessageBox MB_OK|MB_ICONSTOP "The entered path does not contain the correct executable: executable.exe.$\r$\nYou cannot continue!"
Abort # Go back to page
FunctionEnd
-Stu

Thanks guys! I'll check it right now!


It works :D Thank You both once more!!!