The file is installed by the installer, so i can use [#foo.config]. When i thought of doing this approach (XMLConfig || XMLFile), i got stuck because: I want to do the foo.config editing after a specific dialog, i.e EnterConfigurationDlg, so that i can grab the PROPERTIES from that dialog and put them in foo.config.
Following the WiX tutorial at: http://www.tramontana.co.hu/wix/lesson6.php#6.10 did not really help with my senario... Any ideas? Stelios > Pally Sandher wrote: >> If the file is installed as part of your installation you can simply use >> it's Id as a Property e.g. [#foo.config] if you set Id="foo.config" in >> it's File element (see -> >> http://msdn.microsoft.com/en-us/library/aa368609.aspx). Use that >> Property as the path for either XMLConfig or XMLFile to make your >> changes to the file. >> >> If it's put on the target machine by some other means & you can locate >> the file using normal methods such as RegistrySearch >> (http://wix.sourceforge.net/manual-wix3/wix_xsd_registrysearch.htm), >> DirectorySearch >> (http://wix.sourceforge.net/manual-wix3/wix_xsd_directorysearch.htm) or >> FileSearch >> (http://wix.sourceforge.net/manual-wix3/wix_xsd_filesearch.htm) then do >> so to set your Property for XMLConfig/XMLFile. You will need no Custom >> Actions in either of these cases which should make your code much more >> resilient. >> >> If you can't locate the file using normal methods then a Custom Action >> which sets a Property containing the path to the file is your only >> option. >> >> How is this file installed on the target system initially? If it's by >> another product you can usually use a RegistrySearch to find something >> like the InstallLocation & extrapolate the rest of the path from there. >> If you're really lucky & the other products authors thought about this >> ahead of time there may be a standard registry key set by their >> installer for you to grab the location from. >> >> Avoid using Custom Actions unless you have no other option. >> >> Palbinder Sandher Software Deployment & IT Administrator >> T: +44 (0) 141 945 8500 F: +44 (0) 141 945 8501 >> http://www.iesve.com **Design, Simulate + Innovate with the <Virtual >> Environment>** >> Integrated Environmental Solutions Limited. Registered in Scotland No. >> SC151456 Registered Office - Helix Building, West Of Scotland Science >> Park, >> Glasgow G20 0SP >> Email Disclaimer >> >> -----Original Message----- >> From: Stelios Kyprou [mailto:stelios.kyp...@formicary.net] Sent: 07 >> July 2010 11:34 >> To: General discussion for Windows Installer XML toolset. >> Subject: [WiX-users] Editing config files after installation >> >> Hello, >> I suppose this question was asked before, but i couldn't find a clear >> answer for it: >> >> When an installer runs on the target machine, and installs all the files >> in the InstallDir, i would like to carry some extra actions. >> -Get a config file that was installed, i.e foo.config. >> -Modify that file (which is in xml format), by adding some values in the >> key/value pairs. >> >> Now as far as i know from the search i've done, i can only do this after >> InstallFinalize, because that is when the files are showing in the >> InstallDir.? >> >> What is the ideal way of doing this? >> i.e: >> -are there built in wix methods to grab foo.config? >> -should i use the "util:XmlFile" tag for the editing? >> -what are the general steps for doing this process? e.g put all the >> steps in a custom action and call it after InstallFinalize? >> >> Thanks in advance, >> Stelios >> >> -- >> Stelios Kyprou >> Systems Engineer >> Formicary - delivering quality financial technology solutions(TM) >> www.formicary.net >> >> >> ------------------------------------------------------------------------ >> ---- >> This message is confidential and may be privileged. It is intended >> solely for >> the named addressee. If you are not the intended recipient, please >> inform us. >> Any unauthorised dissemination, distribution or copying hereof is >> prohibited. >> >> Formicary Limited registered office in England and Wales, address 1 >> Taillar >> Road, Hedon, East Yorkshire HU12 8GU, registration number 3894343, VAT >> number >> 747644304, does not guarantee that the integrity of this communication >> has been >> maintained nor that this communication is free of viruses, interceptions >> or >> interference. >> ------------------------------------------------------------------------ >> ---- >> >> ------------------------------------------------------------------------ >> ------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> >> >> >> ------------------------------------------------------------------------------ >> >> >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> > -- Stelios Kyprou Systems Engineer Formicary - delivering quality financial technology solutions(TM) www.formicary.net ---------------------------------------------------------------------------- This message is confidential and may be privileged. It is intended solely for the named addressee. If you are not the intended recipient, please inform us. Any unauthorised dissemination, distribution or copying hereof is prohibited. Formicary Limited registered office in England and Wales, address 1 Taillar Road, Hedon, East Yorkshire HU12 8GU, registration number 3894343, VAT number 747644304, does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. ---------------------------------------------------------------------------- ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users