MessageBox in the function
I read the Installation directory from the registry; in a custom page I would check if this installation directory exists or not (is empty): I have used the code
Page custom ShowInfo LeaveInfo
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VerifyDirectory
!insertmacro mui_page_directory
...
Function VerifyDirectory
StrCmp $INSTDIR "" +1 +2
MessageBox MB_OK|MB_ICONSTOP $(ProgramNotFound) ; if program not found message
FunctionEnd
but it does not work not showing the message in both cases. I have used the StrCmp and MessageBox instructions in the LeaveInfo function and there the message is always (in both cases) shown. How to fix it ?