How can you _create_ a text file in Wix?

Is there a way to create a new text file and write it using Wix? I came across elements that will allow me to work with Xml and Ini files, but nothing for a regular text file.

The root of the problem stems from the fact that we are using a third-party library that reads from our own custom configuration file, which really ties my hands to what the text file looks like. The configuration file is similar to the Ini file, minus the "partitions". And I noticed that Wix processes Ini files, always putting them in a system folder that will not work for our needs.

The data that needs to be written to the configuration file is collected at run time, so there is no way to simply install a pre-configured file.

I would like to agree to the Wix extension to achieve the same result, if it exists, but has not yet met it.

+3
source share
3 answers

There is no built-in function in the Windows installer for this. You will need to write code to do this and invoke this code using a special action.

+3
source

IniFile .ini ; @Directory, , . [section], - @Section.

+3

You might want to watch this project . It contains a collection of WiX extensions and user actions, and I believe that it also has a CA for reading and writing text files. Try it - it is stated that it has been tested and proven using in corporate installations.

+2
source

Source: https://habr.com/ru/post/1779276/


All Articles