Can't Get Edit XML Wizard to update existing file - Advanced Installer Community
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Can't Get Edit XML Wizard to update existing file

We have a few XML configuration files that might already be existing on disk.

I can't seem to get the Edit XML wizard to create a new entity in the file when it's already on disk.

I've decoupled the edit xml functionality from the component associated with the file (since that will not get installed in this case, do not overwrite) and assigned to a component that I know will install an exe file but no luck.

EDIT: Forgot to mention this is happening within a merge module installer.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't Get Edit XML Wizard to update existing file

Hi Scott,

In order to achieve what you want, you can add your XML files in the project using the Windows Installer format (so they can be edited). Then open them, select each element and check the "Create element if it doesn't already exist" option and uncheck the "If element is found" option.

Another approach is to create a new "XML Edit" file for each of your configuration files and create only the elements (with the path to them) that you want to add in your configuration files.

If you cannot get this to work you can send us your AIP file and the XML files to support at advancedinstaller dot com so we can investigate them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Can't Get Edit XML Wizard to update existing file

Eusebiu,

Got it to work.

Part of my problem was I needed to get a bit aggressive on selecting a set of "Identifier Attributes" on the entry being added. I had no Identifier Attributes checked and I think "Edit XML (Windows Installer)" was thinking the entry already existed, hence not changing it.

The other lesson learned in all of this is to make sure the defined "Edit XML (Windows Installer)" actions are assigned to a component that you know will always be installed vs. a component marked as "never overwrite". If the component isn't scheduled to run then I believe that "Edit XML (Windows Installer)" won't run as well. So I moved these to the component for my "key" EXE file.

Thanks,
Scott J.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Can't Get Edit XML Wizard to update existing file

You're always welcome Scott. I'm glad you got this working.

Indeed your presumptions are correct, if more keys have the same name, then you should set an "Identifier Attribute" for them, also the "Edit XML" operation should be placed in a component that will be installed, otherwise it will not be executed.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”