WiX在安装过程中会覆盖配置文件。如何避免这种情况? [英] WiX overwrites config files during setup. How can I avoid this?

查看:88
本文介绍了WiX在安装过程中会覆盖配置文件。如何避免这种情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用WiX创建Windows安装程序。不幸的是,我的安装程序在每次更新时都会覆盖一个配置文件。
我真正想要的是安装程序仅在找不到文件的情况下才创建文件。

I'm using WiX to create a windows installer. Unfortunately my installer overwrites a config file on every update. What I really want is, that the installer only creates the file if it is not found.

感谢您,
forki

Thanks and regards, forki

推荐答案

我确定有人会给出正确的答案,但作为备份:

I sure someone will come up with a proper answer, but as a backup:

如果不存在常规配置文件,则可以让安装程序创建默认配置文件,然后让应用程序将默认文件复制到常规配置文件。这也提供了一种简单的方法来将应用程序重置为出厂默认设置(只需删除配置文件)。

You could have the installer create a default configuration file, and then have your application copy the default file to the normal configuration file, if the normal configuration file is not present. This also provides an easy way to reset the application to factory default (just delete the configuration file).

这篇关于WiX在安装过程中会覆盖配置文件。如何避免这种情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆