我在用:
; Set output path to the installation directory.
SetOutPath $INSTDIR\
SetOverwrite on
; Put file there
File "ACC\*.APP"
覆盖文件,但如果文件无法覆盖,那么我希望安装程序退出,如何执行此操作?
是否需要使用错误标志值?但是怎么样?
如果覆盖模式设置为'try'且文件无法覆盖,或者覆盖模式设置为'on'且文件无法覆盖且用户选择忽略,则File命令会设置错误标志
!include LogicLib.nsh
Section
ClearErrors
SetOverwrite try
SetOutPath $INSTDIR
File "ACC\*.APP"
${If} ${Errors}
Quit
${EndIf}
SectionEnd