gpt4 book ai didi

file - 如果文件未被覆盖,则退出安装程序

转载 作者:行者123 更新时间:2023-12-01 11:57:06 24 4
gpt4 key购买 nike

我正在使用:

; Set output path to the installation directory.
SetOutPath $INSTDIR\

SetOverwrite on

; Put file there
File "ACC\*.APP"

要覆盖一个文件,但是如果文件不能被覆盖,那么我想让安装程序退出,怎么办?

是否需要使用错误标志值?但是如何呢?

最佳答案

The File command sets the error flag if overwrite mode is set to 'try' and the file could not be overwritten, or if the overwrite mode is set to 'on' and the file could not be overwritten and the user selects ignore

!include LogicLib.nsh
Section
ClearErrors
SetOverwrite try
SetOutPath $INSTDIR
File "ACC\*.APP"
${If} ${Errors}
Quit
${EndIf}
SectionEnd

关于file - 如果文件未被覆盖,则退出安装程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5991603/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com