gpt4 book ai didi

inno-setup - Inno 设置 "deleteafterinstall"标志 : What happens if file is locked?

转载 作者:行者123 更新时间:2023-12-04 18:08:31 26 4
gpt4 key购买 nike

我正在为一些临时文件使用 deleteafterinstall 标志,但是如果在 Inno Setup 安装程序完成时它们仍然被进程锁定,它们会被安排在以后删除吗?

文档没有提到在这种情况下会发生什么:

deleteafterinstall

Instructs Setup to install the file as usual, butthen delete it once the installation is completed (or aborted). Thiscan be useful for extracting temporary data needed by a programexecuted in the script's [Run] section.

This flag will not cause existing files that weren't replaced duringinstallation to be deleted.

This flag cannot be combined with the isreadme, regserver, regtypelib,restartreplace, sharedfile, or uninsneveruninstall flags.

最佳答案

我不确定您对答案有多少深入的解释,但我认为最好的办法是跳入源代码。因此,所有具有 deleteafterinstall 的文件指定的标志被添加到 DeleteFilesAfterInstallList集合,在取消初始化设置时迭代。当时的藏品是iterated file by file该集合中的每个文件都称为 DeleteFileRedir函数,它可以选择禁用 WOW64 重定向(对于这种情况不重要)并调用 Windows API 函数 DeleteFile ,它不执行延迟删除。

关于inno-setup - Inno 设置 "deleteafterinstall"标志 : What happens if file is locked?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20239683/

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