[wix-users] Create and further maintain .CONFIG configuration files
Tigran Galoyan
tigran.galoyan at gmail.com
Tue Mar 7 11:48:43 PST 2017
Hi,
This time I confronted with a task to create and maintain configuration
files. I was hoping to find the same easy and complete functionality to
deal with .config files as I do with INI, however, it turned
out configuration files are not easy manageable ones.
The task is to copy the default .config file if it doesn't exist on the
customers PC. The file should not be deleted from the target PC on
uninstall. The Permanent="yes" of the parent Component element takes care
of this. However, from time to time I may want to modify the .config file
by adding new element with new attributes, updating the value of the
existing element or the value of its attribute, or delete an existing
element or its attribute. Overwriting the whole file is not an option since
the customer might have customized the .config file, so I only may need to
push new but default updates to the customer's .config file. As .config
files are XML files then I tested lots of scenario using the XmlConfig and
XmlFile elements from Utility extension lib. However, it's like a
nightmare, many things don't work or if possibly work then not the way as I
expect.
Anyone can help me out with it, any suggestions how to take care of
implementing it. Perhaps, there are better ways to cover all required
functionality to work with .config files?
Another option I wanted to try is not to provide a source initial default
configuration file, rather, like for INIs I wanted to generate the .config
file right on the customer PC during the install by having only XmlConfig
and XmlFile declarations under my Component element, however, I fail on
creating even the first root element.
Any thoughts, any ideas?
Thanks,
Tigran
More information about the wix-users
mailing list