UnstoppableDrew
Posts: 32
Joined: Tue Oct 16, 2007 4:04 pm
Location: Burlington, MA USA
Contact: Website Yahoo Messenger

Modifying xml files: I just don't get it

I don't understand how the whole 'modify an xml file' thing is supposed to work. Say I have an xml file I install name 'Web.config'. In it I want to change the line:
<customErrors mode="Off" defaultRedirect="SiteError.htm">
to
<customErrors mode="On" defaultRedirect="SiteError.htm">

How would I go about doing that ?
Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

First, you need to add the XML file in Windows Installer format in the "Files and Folders" page (you use the "Add Files" menu and check the XML file in the "Import Files" dialog).

After this, you can double-click the XML, select an element (for example "customErrors"), go to the "Attributes" tab and change the attribute you need (for example the attribute "mode").

You can read more about this feature here:
http://www.advancedinstaller.com/user-g ... ialog.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
UnstoppableDrew
Posts: 32
Joined: Tue Oct 16, 2007 4:04 pm
Location: Burlington, MA USA
Contact: Website Yahoo Messenger

Is there a way to get it to recognize xml files that don't have a .xml extension ? If I add 'Web.config' it doesn't give me the option of adding it in Windows Installer format, though it does show up as 'XML Configuration File' in the files pane.
Edit: Never mind, I just found the 'Import' menu.
UnstoppableDrew
Posts: 32
Joined: Tue Oct 16, 2007 4:04 pm
Location: Burlington, MA USA
Contact: Website Yahoo Messenger

At what point in the installation process are the xml edits applied ? What I'm trying to do is collect info from the user via my dialog boxes, than make changes to web.config (such as resolve hostnames and turn custom errors on or off). Is this possible ?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
At what point in the installation process are the xml edits applied ?
The XML files are created with the resolved values of the properties you use after the "WriteINIValues" standard action.
What I'm trying to do is collect info from the user via my dialog boxes, than make changes to web.config (such as resolve hostnames and turn custom errors on or off). Is this possible ?
Yes, this can be done by using the properties of the edit boxes in the XML file (the ones used to collect information from the user). Their values will be resolved when the XML files are created (right after the "WriteINIValues" standard action).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”