简体   繁体   English

如何使用 Inno Setup 安装程序和卸载程序不删除某些文件

[英]How to not remove certain files with Inno Setup installer and uninstaller

I am creating an installer using Inno Setup.我正在使用 Inno Setup 创建安装程序。 Below is my code.下面是我的代码。

In my code, I save the configuration files in {userappdata}\\testApp\\settingFiles .在我的代码中,我将配置文件保存在{userappdata}\\testApp\\settingFiles

[Files]
Source: "C:\Users\taichi\Documents\hold\kivyTest\settingFiles\*"; \
    DestDir: "{userappdata}\testApp\settingFiles"; \
    Flags: ignoreversion recursesubdirs createallsubdirs

I don't want to delete {userappdata}\\testApp\\settingFiles once the user has set up.我不想在用户设置后删除{userappdata}\\testApp\\settingFiles

I do not want to delete this folder when the uninstaller is run.我不想在卸载程序运行时删除此文件夹。

Also, I don't want to overwrite this folder when the installer is run.此外,我不想在安装程序运行时覆盖此文件夹。

How can I do that?我怎样才能做到这一点?

I assume you are looking for onlyifdoesntexist and uninsneveruninstall flags .我假设您正在寻找onlyifdoesntexistuninsneveruninstall标志

[Files]
Source: "C:\Users\taichi\Documents\hold\kivyTest\settingFiles\*"; \
    DestDir: "{userappdata}\testApp\settingFiles"; \
    Flags: ignoreversion recursesubdirs createallsubdirs \
           onlyifdoesntexist uninsneveruninstall

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何让 Inno Setup 安装程序在安装完成后或 VSTO 安装程序完成后保留临时文件? - How to make Inno Setup installer keep temporary files either after installation completes or after VSTO installer completes? Inno Setup:如何在安装程序中集成管理员凭据 - Inno Setup : how to integrate admin credentials in the installer 如何修改Inno Setup Installer的嵌入式清单? - How to modify the embedded manifest of an Inno Setup Installer? 如何在 Inno Setup 中获取安装程序路径? - How to get the installer path in Inno Setup? 如何获取包含在 inno setup installer exe 文件中的文件版本(exe 和 dll)? - How to get versions of files (exe's and dll's) which are included to inno setup installer exe file? 在卸载过程中删除注册表项(不是由安装程序创建的)(Inno Setup) - Remove registry entry (which is not created by installer) during uninstallation (Inno Setup) 如何从 Inno Setup 安装程序设置全局环境变量? - How to set a global environment variable from Inno Setup installer? 如何在 Inno Setup 安装程序后运行 PowerShell 脚本 - How to run a PowerShell Script after Inno Setup installer Inno Setup:如何将安装程序本身放入已安装的程序中 - Inno Setup: How to put the installer itself in the installed program 如何使用 Inno Setup 安装程序升级 MSI 安装? - How to upgrade an MSI install using Inno Setup installer?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM