cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Christian1984
Level 4

Xml File Changes and Custom Dialog

Hello,

I'm using Xml File Changes to modify or keep xml settings during installation / update. This works quite well, but I've come accross a problem: I want to give the user the opportunity to change some of the settings during the installation (/major update) in a dialog of the setup.
Setting the Xml-entries with the dialog works fine but how do I get the dialog to show the current information when it loads? For example i have an entry like this: "
Hope it is clear what I want 🙂

With kind regards
Labels (1)
0 Kudos
(8) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Typically one would use something like and then author a dialog with an edit control linked to the DBNAME_PROP property, and optionally provide a default value for that property in the Property Manager.
0 Kudos
Christian1984
Level 4

Hi,

that's exactly what I did. I have the prefix "SystemDB" in the Xml File Changes view and the attribute "DBNAME" with value "[PROPERTY]". I have created this property in the property manager and set its value to a default value which to use, when first installing for example. In the dialog I have an edit field with property "PROPERTY". This works in so far that it writes the value I enter into the xml-file. But it doesn't read it on a major update. It always uses the default value from the property manager.
Any idea why this happens? Doe the values in operation and scheduling have anything to do with it? I have "Create" and "Install".

With kind regards
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Properties are not generally preserved from installation to uninstallation or maintenance. For something like this, you will probably want to author a system search for an XML file value to pull in the current value from the file. This will then override the default you originally stored in your .msi file.
0 Kudos
Christian1984
Level 4

Hi,

using system search doesn't work either. I have created a new system search searching for an xml file value in an xmlfile in my installdir. It searches in XPATH: "configuration/ServiceApplicationConfig/SystemDB" (When is system search started? I need the information in customer information dialog, so before the user has the chance to change the installdir for example. Is that the problem?

The Log-File displays the following error:
InstallShield 09:14:45: Searching for an XML Attribute value using the Element 'configuration/ServiceApplicationConfig/CustomerDB' and the Attribute 'DBName'.
InstallShield 09:14:45: The location of the XML file, stored in the Property 'FILENAME', is currently a NULL value. It appears that the AppSearch did not find the file.

But the file definately exists.

With kind regards
0 Kudos
Christian1984
Level 4

Nobody any idea?
0 Kudos
Christian1984
Level 4

I have fixed this now by writing the INSTALLDIR to registry and creating a system search for that registry entry. Now the XML-File is found.
But now I have a new problem:
The element is not found. I get the following error:
InstallShield 10:17:29: Searching for an XML Attribute value using the Element '/configuration/ServiceApplicationConfig/CustomerDB' and the Attribute 'DBName'.
InstallShield 10:17:29: Element not found using the following Element: /configuration/ServiceApplicationConfig/CustomerDB. It is possible that the element did not exist or the XPath syntax is invalid.

The element is definately there:



...

Do you have any idea?

With kind regards
0 Kudos
Christian1984
Level 4

I now have tried different ways to enter the XPath but they all didn't work. I have found some hints that XPath has problems with the xmlns (namespace).
Seems like I have to use InstallScript to get there.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Yes, the XML App Search is not able to handle namespaces at this point. The request to add this support is being tracked under WO# IOA-000032990.
0 Kudos