当前位置:网站首页>NSIS finds out whether the file exists and sets the installation path

NSIS finds out whether the file exists and sets the installation path

2022-07-05 07:34:00 sukhoi27smk

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 already installed "
               StrCpy $INSTDIR "C:\Program Files\Git"
               StrCpy $GIT "true"
  IfFileExists "D:\Program Files\Git\git-cmd.exe" 0 +4
               MessageBox MB_OK "Git already installed "
               StrCpy $INSTDIR "D:\Program Files\Git"
               StrCpy $GIT "true"
  ${If} $GIT == "false"
               MessageBox MB_OK "Git No installation , Exit setup !"
               Abort
  ${EndIf}
FunctionEnd

原网站

版权声明
本文为[sukhoi27smk]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140553428697.html