Inno Setup:安装更新时不要覆盖设置文件 [英] Inno Setup: Do not overwrite settings file, when installing an update
本文介绍了Inno Setup:安装更新时不要覆盖设置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为C ++应用程序创建了一个Inno Setup脚本.该脚本可以正常运行,并且包含以下内容:
I have created an Inno Setup script for a C++ app. The script works fine and consists of the following:
[Files]
Source: "C:\Users\john\Desktop\My_App_setup\my_app.exe"; DestDir: "{app}"; \
Flags: ignoreversion
Source: "C:\Users\john\Desktop\My_App_setup\settings\*"; DestDir: "{app}\settings"; \
Flags: ignoreversion recursesubdirs createallsubdirs
文件是C ++可执行文件my_app.exe
和由最终用户定制的设置文本文件.
The files are the C++ executable my_app.exe
and a settings text file that is customized by the end user.
我想做的是,当我有一个新版本的my_app.exe
来仅更新此文件并保留与用户迄今为止可能已更改的设置相同的设置.
What I'd like to do is when I have an new version of my_app.exe
to update just this file and leave the same settings that the user may have changed so far.
我应该尝试什么?
推荐答案
Just add onlyifdoesntexist
flag:
Source: "C:\Users\john\Desktop\My_App_setup\settings\*"; DestDir: "{app}\settings"; \
Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist
这篇关于Inno Setup:安装更新时不要覆盖设置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文