检测文件存在

优质
小牛编辑
119浏览
2023-12-01
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeave
!insertmacro MUI_PAGE_DIRECTORY
Function DirectoryLeave
IfFileExists "$INSTDIR\*.*" 0 +3
  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
  "The destination folder already exists. $\r$\n \
   Would you like to use it anyway?" MB_OK +2
  Abort
FunctionEnd