Var GIT
Function .onInit!insertmacro MUI_LANGDLL_DISPLAYStrCpy $GIT "false"MessageBox MB_OK $9IfFileExists "C:\Program Files\Git\git-cmd.exe" 0 +4MessageBox MB_OK "Git已安装"StrCpy $INSTDIR "C:\Program Files\Git"StrCpy $GIT "true"IfFileExists "D:\Program Files\Git\git-cmd.exe" 0 +4MessageBox MB_OK "Git已安装"StrCpy $INSTDIR "D:\Program Files\Git"StrCpy $GIT "true"${If} $GIT == "false"MessageBox MB_OK "Git没有安装,退出安装!"Abort${EndIf}
FunctionEnd