I ended up using XmlConfig instead. -----Original Message----- From: Pally Sandher [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2008 4:32 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Help with XmlFile, FileCopy and ExeCommand
I have the same problem trying to modify the inner text of a node. My code looks like the following: <Component Id="Dialogs" DiskId="1" Guid="myguid"> ... <File Id="IESveInterfaceParameters.xml" Name="IESveInterfaceParameters.xml" Source="..\..\..\code\Sketchup\Plugins\IESLink\Dialogs\IESveInterfaceParameters.xml" /> ... <util:XmlFile Id="updateVELocation" Action="setValue" File="[#IESveInterfaceParameters.xml]" Value="[VE59LOCATION]apps" ElementPath="/IESInterface/IESveLocation" SelectionLanguage="XPath" /> </Component> The contents of the IESveInterfaceParameters.xml file are as follows: <?xml version='1.0'?> <IESInterface> <IESveLocation>M:\IES\apps</IESveLocation> <OutputveXMLLocation> </OutputveXMLLocation> <Preferences city='Boulder (CO)' latitude='40.017' minimumFloorArea='0.0' buildingAreaType='Office' thinWalls='1' buildingRoomService='VariableRefrigerantFlow' VerticalHorizontalElementTransitionAngle='45.0' adjacencySeparationDistance='0.91441111923921' longitude='-105.283' diagnosticAids='no' minimumRoomHeight='0.0'/> </IESInterface> And I get the same result in my log file: Action 12:08:28: ExecXmlFile. MSI (s) (40:C4) [12:08:28:138]: Executing op: CustomActionSchedule(Action=ExecXmlFile,ActionType=3073,Source=BinaryData,Target=ExecXmlFile,CustomActionData=1€1€C:\Program Files (x86)\Google\Google SketchUp 6\Plugins\IESLink\Dialogs\IESveInterfaceParameters.xml€3€/IESInterface/IESveLocation€€C:\Program Files (x86)\IES\VE 59\) MSI (s) (40:C4) [12:08:28:138]: Creating MSIHANDLE (10) of type 790536 for thread 1988 MSI (s) (40:C0) [12:08:28:138]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI4.tmp, Entrypoint: ExecXmlFile MSI (s) (40:C0) [12:08:28:169]: Generating random cookie. MSI (s) (40:C0) [12:08:28:169]: Created Custom Action Server with PID 1464 (0x5B8). MSI (s) (40:A8) [12:08:28:216]: Running as a service. MSI (s) (40:A8) [12:08:28:216]: Hello, I'm your 32bit Elevated custom action server. MSI (s) (40:C0) [12:08:28:497]: Closing MSIHANDLE (10) of type 790536 for thread 1988 Action ended 12:08:28: InstallFinalize. Return value 3. I'm about to give up & write a small console app to do the modification for me when passed the location of the xml file & the path I need added to it & then schedule it using QtExec as I've tried both util:XMLFile & util:XMLConfig & neither work. It doesn't help that their documentation consists solely of very basic descriptions of their attributes in the Util schema section. Palbinder Sandher Software Deployment and 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: Joel Paula (hotmail) [mailto:[EMAIL PROTECTED] Sent: 21 October 2008 19:09 To: WiX-users@lists.sourceforge.net Subject: [WiX-users] Help with XmlFile, FileCopy and ExeCommand I have an Xml file I need to put in another application file, write some xml to it and run it with that 3rd party application. Sequence of events: 1. Write Xml to file 2. Get the Directory/Folder where the 3rd party application is sitting from win.ini 3. Copy Xml file to 3rd party app folder 4. Run 3rd party app against my Xml File. My code: <!-- Get the Folder from Win.ini --> <Property Id="GALILEOFOLDER"> <IniFileSearch Id="win.ini" Name="win.ini" Section="Focalpoint" Key="SWDIR" Type="directory"> </IniFileSearch> </Property> <!-- copy Xml file to app folder, write xml to it and copy it to the 3rd party app folder. 3rd party app exists if the win.ini entry is there --> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLLOCATION" Name="MyApp"> <Component Id="aero.justify.xml" Guid="6C65CE83-50D0-4D73-AE3B-868536D56081" > <File Id="aero.justify.xml" Name="aero.justify.xml" KeyPath="yes" Source="aero.justify.xml" /> <Condition><![CDATA[Installed OR GALILEOFOLDER]]></Condition> <util:XmlFile Id="ViewpointButtonPicture" File="aero.justify.xml" Action="setValue" ElementPath="//[EMAIL PROTECTED]'PNRViewGalileo.Toolbar.xml'[\]]/Add/Button/Pic ture" Value="<![\[]CDATA[\[][INSTALLLOCATION]Panorama22.bmp[\]][\]]>" SelectionLanguage="XPath"/> <util:XmlFile Id="ViewpointButtonAction" File="aero.justify.xml" Action="setValue" ElementPath="//[EMAIL PROTECTED]'PNRViewGalileo.Toolbar.xml'[\]]/Add/Button/Act ion" Value="<![\[]CDATA[\[][INSTALLLOCATION]$(var.Aero.TargetFileName)[\]][\]] >" SelectionLanguage="XPath"/> <util:XmlFile Id="FocalpointButtonPicture" File="aero.justify.xml" Action="setValue" ElementPath="//[EMAIL PROTECTED]'focalpoint.config.xml'[\]]/Add/Button/Picture" Value="<![\[]CDATA[\[][INSTALLLOCATION]Panorama22.bmp[\]][\]]>" SelectionLanguage="XPath"/> <util:XmlFile Id="FocalpointButtonAction" File="aero.justify.xml" Action="setValue" ElementPath="//[EMAIL PROTECTED]'focalpoint.config.xml'[\]]/Add/Button/Action" Value="<![\[]CDATA[\[][INSTALLLOCATION]$(var.Aero.TargetFileName)[\]][\]] >" SelectionLanguage="XPath"/> <CopyFile Id="aero.justify.xmlcopy" DestinationProperty="GALILEOFOLDER" FileId="aero.justify.xml"/> </Component> </Directory> </Directory> <Feature Id="ProductFeature" Title="Panorama" Level="1" InstallDefault="local" Absent="disallow"> <ComponentRef Id="aero.justify.xml" /> </Feature> <CustomAction Id="aero.justify.xmlrun" Property="GALILEOFOLDER" ExeCommand="XmlJustify.exe /actionfile:aero.justify.xml /logfile:aero.toolbar.log" Execute="deferred" Impersonate="no" Return="check" /> <InstallExecuteSequence> <Custom Action="aero.justify.xmlrun" Before="InstallFinalize"> <![CDATA[GALILEOFOLDER]]> </Custom> </InstallExecuteSequence> I think this code has some kind of error because the installer is rolling back and terminating unexpectedly. Here is the debug info: MSI (s) (44:E0) [18:52:56:997]: Executing op: ActionStart(Name=ExecXmlFile,,) Action 18:52:56: ExecXmlFile. MSI (s) (44:E0) [18:52:57:001]: Executing op: CustomActionSchedule(Action=ExecXmlFile,ActionType=3073,Source=BinaryData,Ta rget=ExecXmlFile,CustomActionData=1?1?aero.justify.xml?3?//[EMAIL PROTECTED]'PNRVi ewGalileo.Toolbar.xml']/Add/Button/Picture??<![CDATA[C:\Program Files\ambroZio\Panorama22.bmp]]>?3?//[EMAIL PROTECTED]'PNRViewGalileo.Toolbar.xml' ]/Add/Button/Action??<![CDATA[C:\Program Files\ambroZio\Aero.exe]]>?3?//[EMAIL PROTECTED]'focalpoint.config.xml']/Add/Butto n/Picture??<![CDATA[C:\Program Files\ambroZio\Panorama22.bmp]]>?3?//[EMAIL PROTECTED]'focalpoint.config.xml']/Add /Button/Action??<![CDATA[C:\Program Files\ambroZio\Aero.exe]]>) MSI (s) (44:38) [18:52:57:006]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIF438.tmp, Entrypoint: ExecXmlFile MSI (s) (44:74) [18:52:57:007]: Generating random cookie. MSI (s) (44:74) [18:52:57:019]: Created Custom Action Server with PID 8660 (0x21D4). MSI (s) (44:7C) [18:52:57:061]: Running as a service. MSI (s) (44:7C) [18:52:57:062]: Hello, I'm your 32bit Elevated custom action server. End of action 18:52:57: InstallFinalize. Returned value 3. MSI (s) (44:E0) [18:52:57:178]: User policy value 'DisableRollback' is 0 MSI (s) (44:E0) [18:52:57:178]: Machine policy value 'DisableRollback' is 0 MSI (s) (44:E0) [18:52:57:181]: Executing op: Header(Signature=1397708873,Version=400,Timestamp=961910413,LangId=1046,Plat form=0,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttribu tes=1) MSI (s) (44:E0) [18:52:57:181]: Executing op: DialogInfo(Type=0,Argument=1046) MSI (s) (44:E0) [18:52:57:181]: Executing op: DialogInfo(Type=1,Argument=Panorama) MSI (s) (44:E0) [18:52:57:182]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=A anular a acção:,RollbackTemplate=[1],CleanupAction=RollbackCleanup,CleanupDescription =Removing backup files,CleanupTemplate=File: [1]) MSI (s) (44:E0) [18:52:57:182]: Executing op: RegisterBackupFile(File=C:\Config.Msi\1363fc12.rbf) ... Action 18:52:57: Rollback. Nulling action: Rollback: ExecXmlFile MSI (s) (44:E0) [18:52:57:186]: Executing op: ActionStart(Name=ExecXmlFile,,) ... Thanks for your help. All the best, Joel ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users