Rob Mensching wrote:
>> Am I going to have to resort to a custom action to read the settings
and
>> propagate them? If so, ugh. It seems like there should be a WiX
custom
>> action for simply reading the contents of an XML file (value or
>> attribute) and putting the value into a property.
>
> Open feature request that no one has had time to write.  Care to write
it?

This would fall into the bucket of "sure, when I have time", but my C++
skills may not be up to the task. Looks like you've got some library
functions already written that would make it fairly easy though. If I
get to it, I'll contact you about what I need to do to submit the code
for inclusion into the project.

In the meantime, since it looks like I'll need to rely on a custom
action, I can code a DTF custom action to do what I want. As a reminder,
I'm wanting to:

* Read the user's app.config file, if it has already been installed
* Get the settings out of the config file set during the initial
installation
* Restore those settings to the newly-installed config file

Furthermore, I only want to do this in the update, reinstall, or repair
case. My code to set the config values during the initial installation
works great; I just need to preserve those settings should the user ever
repair, reinstall, or apply an update (which I'm implementing as a
reinstall with an updated .msi).

What I'm looking for is some guidance about how to use my custom action.
My instincts tell me to perform a FileSearch for the config file and set
a custom property if the file exists; schedule the "harvest settings"
custom action before InstallFiles; and within the custom action code,
harvest the settings if the custom property is actually set. Are my
instincts correct or is there a better way?

For my own education about Windows Installer and WiX, I have a few other
questions that the SDK docs aren't clear to me on: 

Should I be trying to conditionally schedule the custom action to only
run during reinstall? If so, what properties should I be checking
(checking REINSTALLMODE for the value "vomus" seems fragile to me)?

How do you conditionally schedule a custom action anyway (neither the
CustomAction nor the Custom elements support a Condition element)?

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to