!macro CheckVersion FileOpen $4 "$INSTDIR\DB\config\VERSION" r FileRead $4 $1 FileClose $4 ${If} $1 != "" ${StrStr} $0 $1 "${CURRENT_VERSION}" ${If} $0 == "" ${StrStr} $0 $1 "${MIN_REQUIRED_VERSION}" ${If} $0 == "" MessageBox MB_OK "This version can only be installed on ${MIN_REQUIRED_VERSION}.x systems, you have $1" Quit ${EndIf} ${EndIf} ${EndIf} !macroend !macro CheckVersionEx IfFileExists "$INSTDIR\DB\config\VERSION" isDB isCollector isDB: FileOpen $4 "$INSTDIR\DB\config\VERSION" r Goto check isCollector: FileOpen $4 "$INSTDIR\Collector\config\VERSION" r check: FileRead $4 $1 FileClose $4 ${If} $1 != "" ${StrStr} $0 $1 "${CURRENT_VERSION}" ${If} $0 == "" ${StrStr} $0 $1 "${MIN_REQUIRED_VERSION}" ${If} $0 == "" MessageBox MB_OK "This version can only be installed on ${MIN_REQUIRED_VERSION}.x systems, you have $1" Quit ${EndIf} ${EndIf} ${EndIf} !macroend .