Wix major upgrade

前端 未结 3 1037
天涯浪人
天涯浪人 2021-02-04 10:47

How do I use WIX to prevent overwriting a config file during a \'Major Upgrade\'?

I want the file to be installed on the initial install, removed on uninstall, and left

3条回答
  •  心在旅途
    2021-02-04 11:27

    You can use the UPGRADINGPRODUCTCODE property to check if you are upgrading. We use this to determine if we should run our 'clean up' custom action:

    
      
    
    

    I do agree with Rob, in that the config is user data, stored in their AppData folders, and never created by the MSI. Instead it is set do a default value (which we store as a default config in the programs files), and copied over by the app itself. But we don't want to leave these things cluttering a user's machine if they want to uninstall our product, so we made a CleanUpFiles that searches the HD for any garbage left behind.

提交回复
热议问题