thico_
4th January 2005 21:09 UTC
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!
kichik
4th January 2005 21:40 UTC
Use the .onVerifyInstDir callback function.
Afrow UK
4th January 2005 21:42 UTC
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
thico_
4th January 2005 21:52 UTC
Thanks guys! I'll check it right now!
thico_
4th January 2005 22:13 UTC
It works :D Thank You both once more!!!