Hi everyone, I have a small testing (to teach myself how to do these things) installer that basically just uses util:XmlFile to edit a config file
<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="e5ea734a-3c94-45ec-946d-a8e8892e5e6a" UpgradeCode="a6f5f4cf-3632-4e0a-a3fc-322dca11bc47" Version="1.0.0.0" Language="1033" Name="GeneralSettingsChange-20121116095537" Manufacturer="Statistics Canada" Codepage="1252"> <Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." /> <Media Id="1" Cabinet="GeneralSettingsChange-20121116095537.cab" EmbedCab="yes" /> <Directory Id="TARGETDIR" Name="SourceDir" /> <DirectoryRef Id="TARGETDIR"> <Component Id="Cad8e202a380443cc87afb147a7fb622e" Guid="2165af6f-7c55-47d8-9373-1476ba4d9ace" DiskId="1"> <util:XmlFile Id="Cad8e202a380443cc87afb147a7fb622e" Action="setValue" ElementPath="/configuration/General/add[@key='Password']" Name="value" Value="test!" File="[ProgramFilesFolder]\Statistics Canada\Dialer 3\GeneralSettings.xml" SelectionLanguage="XPath" Sequence="1" /> </Component> </DirectoryRef> <Property Id="Creator" Value="STATCAN\dougkei" /> <Feature Id="MainApplication" Title="Main Application" Level="1"> <ComponentRef Id="Cad8e202a380443cc87afb147a7fb622e" /> </Feature> </Product> </Wix> It is supposed to change (for the sake of testing figuring out how to do a more generalized front end I'm building) <?xml version="1.0" encoding="utf-8"?> <configuration> <General> <add key="UserId" value="m3000"/> <add key="Password" value="test"/> </General> </configuration> To: <?xml version="1.0" encoding="utf-8"?> <configuration> <General> <add key="UserId" value="m3000"/> <add key="Password" value="test!"/> </General> </configuration> Unfortunately this seems to change the wrong element; I get: <?xml version="1.0" encoding="utf-8"?> <configuration> <General> <add key="UserId" value="test!"/> <add key="Password" value="test"/> </General> </configuration> Am I using XPath incorrectly? I tried an XPath testing site (http://www.mizar.dk/XPath/Default.aspx) which seems to confirm my expectations; I can only conclude that I'm missing something or there is a bug in util:XmlFile ... Any assistance welcome! Keith Douglas Statistics Canada | 170 Tunney's Pasture Driveway, Ottawa ON K1A 0T6 Statistique Canada | 170, promenade Tunney's Pasture, Ottawa ON K1A 0T6 [email protected] Telephone | Téléphone 613-951-4405 Facsimile | Télécopieur 613-951-1966 Government of Canada | Gouvernement du Canada ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ WiX-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-users

