WiX, how to prevent files from uninstalling though we forgot to set Permanent=“yes”

前端 未结 2 1422
-上瘾入骨i
-上瘾入骨i 2021-02-15 11:42

We have a product installer created with Wix, containing a program package (\"V1\") and some configuration files. Now, we are going to make a major upgrade with

2条回答
  •  梦毁少年i
    2021-02-15 12:10

    The way I am fixing this is very simple. I don't install yourapp.config files but only yourapp.config.new On the first run the application before doing anything else check for the config file. If there is none make a copy yourapp.config.new to yourapp.config

    This is very simple it doesn't use any special attributes. When the application is uninstalled the config file is not uninstalled. When the application is re-installed file is disturbed. Note that when the application is repaired the config is not modified either.

提交回复
热议问题