Var GIT
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
StrCpy $GIT "false"
MessageBox MB_OK $9
IfFileExists "C:\Program Files\Git\git-cmd.exe" 0 +4
MessageBox MB_OK "Git已安装"
StrCpy $INSTDIR "C:\Program Files\Git"
StrCpy $GIT "true"
IfFileExists "D:\Program Files\Git\git-cmd.exe" 0 +4
MessageBox MB_OK "Git已安装"
StrCpy $INSTDIR "D:\Program Files\Git"
StrCpy $GIT "true"
${If} $GIT == "false"
MessageBox MB_OK "Git没有安装,退出安装!"
Abort
${EndIf}
FunctionEnd
NSIS 查找文件是否存在,并设置安装路径
最新推荐文章于 2024-06-22 15:55:15 发布