Windows installer musings
Rod Widdowson
rdw at steadingsoftware.com
Fri Aug 22 05:54:14 EDT 2014
Thanks Rhys,
Warning it's dangerous to show too much WiX/Msi Installer knowledge.....
> >> What I would like the upgrade to do is rename the existing conf to
> >> conf.old or conf-v2 or whatever, and then selectively create or copy
files
> >> over into the new conf/
> >
> > That I'd like - I hope I can pull it off..
>
> Should be easy enough to do using CustomActions that call VBScript (a.k.a.
the
> WiX get out of jail free card).
Right - As I mentioned earlier I'd prefer writing it in CPP, but that’s not
going to happen. Do you happen to have an example of calling MsiSetProperty
from VbScript I can plagiarize^H^H^H^H^H^H research? That might make a
bunch of stuff easier.
An alternative is CAQuietExec...
The issue that worries me is making it happen at the correct time in the
right execute sequence (which in turn means I remember what was the issue
that bugging me when I wrote that throw away line). I’ll probably start
with it between “RemoveFiles” and before “InstallFiles” in the "deferred"
sequence. Then of course you need to register the correct unwind function
and make it happen correctly – I always have to derive the “&feature=3”,
“!feature”, “?component”, “$component” syntax from first principals, but I
should be able to avoid that in this case and just consult a NOT [property].
It’s not hard, but it requires reaching that zen-like state of understanding
the Windows Installer and writing the code before you fall out of it....
> If you do end up needing to edit XML files in WiX, that’s fairly easy if
you’re just changing the values within named elements, using util:XmlFile.
That would also be useful (for things like adding to services.xml), Now I
wonder who could help with the XPATH stuff:-)
Thanks again.
R
More information about the dev
mailing list