This is one of the pain points in switching from InstallShield ( which has had an AppSearch/XMLLocator extension pattern for years ) to WiX. Implementing this pattern in DTF would be pretty easy. Fully writing it as a WiX C++ CA/Extension would be a lot more work but it really needs to get done. I'd love to do it, but my C++ skills, well, suck.
--- On Wed, 7/2/08, Evans, Jim <[EMAIL PROTECTED]> wrote: > From: Evans, Jim <[EMAIL PROTECTED]> > Subject: Re: [WiX-users] Protecting "config" files during an upgrade > To: "General discussion for Windows Installer XML toolset." > <wix-users@lists.sourceforge.net> > Date: Wednesday, July 2, 2008, 7:28 AM > 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 ------------------------------------------------------------------------- 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