jminsa
Posts: 25
Joined: Mon Oct 29, 2018 5:45 pm

XML Search sometimes not executed

Hi,

I am having a show-stopper random problem with my advanced installer setup.

I am going to send you by email the aip file and wo detailed logs, one where everything works as expected and another where does not work well, I hope you can help me with this one.

The problem is the following:
- In the project there is a Network dialog where the user enters the IP configuration of several servers, this dialog is shown only during the first install.
- Each of the servers has a default IP that it is filled in the dialog automatically.
- When the program is already intalled I run a update which first uninstalls the previous version, during the uninstall phase few configuration files are backed up in the CommonAppDataFolder.
- After uninstall the setup is suppose to execute a XML search in the backed up confguration files which finds the previous IP configuration.
- Well, the problem is that the search it is not always executed, and when it is not executed instead of the previously configured IP addresses the program ends up with the default addresses.

I am going to send the files by email with the same subject as this topic.

In the "CeCoCo Operator Install Success.log" file you can find in the line 351 the text "AI_XmlLocator: Executing XML file:" the following lines set the value to several properties from the XML files, for example: C2A_SERVER_IP, LOCAL_IP, SERVER_IP, DCR_SERVER_IP.

In the "CeCoCo Operator Install Failure.log" file you can see that the AI_XmlLocator is not being executed.

THE FOLLOWING LINES ARE MISSING:

AI_XmlLocator: Executing XML file: "C:\ProgramData\CeCoCo\Ini\CMOperator.exe.config" locators
MSI (c) (98!08) [16:16:50:324]: PROPERTY CHANGE: Modifying C2A_SERVER_IP property. Its current value is '172.26.100.91'. Its new value: '172.26.130.134'.
MSI (c) (98!08) [16:16:50:324]: PROPERTY CHANGE: Adding LOCAL_IP property. Its value is '172.26.130.70'.
MSI (c) (98!08) [16:16:50:324]: PROPERTY CHANGE: Modifying SERVER_IP property. Its current value is '172.26.100.89'. Its new value: '172.26.130.134'.
AI_XmlLocator: Executing XML file: "C:\ProgramData\CeCoCo\Ini\CultureConfiguration.xml" locators
AI_XmlLocator: Executing XML file: "C:\ProgramData\CeCoCo\Ini\CcmRecordingService.exe.config" locators
MSI (c) (98!08) [16:16:50:324]: PROPERTY CHANGE: Modifying DCR_SERVER_IP property. Its current value is '172.26.100.25'. Its new value: '172.26.130.20'.
Action ended 16:16:50: AI_XmlLocator. Return value 1.


Could you help me to figure out why sometimes the installation is executing the search and others is ignoring it?
jminsa
Posts: 25
Joined: Mon Oct 29, 2018 5:45 pm

Re: XML Search sometimes not executed

Hi,

Any advance on this issue?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML Search sometimes not executed

Hi,

Sorry for the delay.

I looked over your log files and they both show that the XML Search is always performed, however the failing one does not find the requested entries. This may happen if the XML files are not present on the machine when the search is performed or if the path to them is not correct.

Does the problem appear in some specific scenarios or it appears in the same scenario, but randomly?

Please keep in mind that the searches are always executed at the beginning of the installation/upgrade, not after the uninstall has been performed. So, during an upgrade, you need to be sure that the XML files are present in the CommonAppDataFolder before the uninstall of the old version.

Also, since the search is performed at the beginning of the upgrade, you do not need to backup them in that folder only for the XML Search purpose.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jminsa
Posts: 25
Joined: Mon Oct 29, 2018 5:45 pm

Re: XML Search sometimes not executed

Thanks,

I thought that the update process first performed a uninstall and then a install, then my idea was that in the uninstall I could copy the files to my backup location and then the search in the install process would always find them.

What you are saying is that the search is performed at the very begining, then if the files are already there because a previous uninstall process left them in the correct location the search works, but if the files are not already there it does not work, because the backup of the files is done after the search has been performed.
That explains few things.

Is there any way to perform the searches again at the time I need?, for example using a custom task.

Another option would be to do the backup when the setup starts and before the search is performed.

Thanks for your help
Jose
jminsa
Posts: 25
Joined: Mon Oct 29, 2018 5:45 pm

Re: XML Search sometimes not executed

Hi again,

I have tried to move the backup of the ini files before the searches on the install sequence.

The Table editor shows the following:
TableEditorBackupAndSearch.png
TableEditorBackupAndSearch.png (10.66 KiB) Viewed 6940 times
However the search is always executed before the backup of the files is completed.

In the log I see the following line after the backup of the files is done:

Action start 17:26:41: AppSearch.
MSI (s) (68:84) [17:26:41:032]: Skipping AppSearch action: already done on client side
Action ended 17:26:41: AppSearch. Return value 0.

Is there any way of achieving what I need?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML Search sometimes not executed

Hi,
Is there any way to perform the searches again at the time I need?, for example using a custom task.
I'm afraid that performing the INI searches again at a later time is not possible. You can only implement your own custom action that performs the INI searches and schedule it at the point you need.
Another option would be to do the backup when the setup starts and before the search is performed.
Yes, you can do the backup before the search, however as I mentioned in the previous reply, you do not need to perform a backup, you can search the INI files directly in the location where they are originally placed by the application.
I have tried to move the backup of the ini files before the searches on the install sequence.

However the search is always executed before the backup of the files is completed.
The custom action order did not change because you changed them only in the "InstallExecuteSequence" table. Please change their order in the "InstallUISequence" table too and see if it works.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jminsa
Posts: 25
Joined: Mon Oct 29, 2018 5:45 pm

Re: XML Search sometimes not executed

I'm afraid that performing the INI searches again at a later time is not possible. You can only implement your own custom action that performs the INI searches and schedule it at the point you need.
oops!, I would like to ask why but I guess I will not bother.
Yes, you can do the backup before the search, however as I mentioned in the previous reply, you do not need to perform a backup, you can search the INI files directly in the location where they are originally placed by the application.
Sorry, That was my first approach and it did not work because the search is performed before the path resolution and their original place depends on the path resolution.
Also doing the backup has the advantage that when a customer uninstalls completely the application to do a fresh install the previous confguration is found automatically and restored for him.
The custom action order did not change because you changed them only in the "InstallExecuteSequence" table. Please change their order in the "InstallUISequence" table too and see if it works.
I tried that too and it did not worked. Proper customer support would now if that works before me trying and wasting my time.
I have opted for doing the backup of the files after install and everytime the application is executed.

Regarding the customer support, I have to tell you this is not satisfactory, when a customer asks for help and tells you that this is a show stopper, it cannot take you four days for the first reply and another four for the second.

regards
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: XML Search sometimes not executed

Hi Jose,
oops!, I would like to ask why but I guess I will not bother.
Sorry, I thought at the INI search which is performed by Windows Installer and Windows Installer only perform searches at the beginning of the installation. The XML search is performed by an Advanced Installer custom action which can be triggered at any point through the VBS code below:

Code: Select all

Session.DoAction("AI_XmlLocator")
Sorry, That was my first approach and it did not work because the search is performed before the path resolution and their original place depends on the path resolution.
Also doing the backup has the advantage that when a customer uninstalls completely the application to do a fresh install the previous confguration is found automatically and restored for him.
Indeed, the XML search is performed before the path resolution, but you can change this as explained in the "Problem with Search XML: backup some installed file tags" thread. But indeed, during a fresh install the previous configuration will not be available anymore.
I tried that too and it did not worked. Proper customer support would now if that works before me trying and wasting my time.
I have opted for doing the backup of the files after install and everytime the application is executed.
This should work if you configure the XML Search custom action as explained in the thread I mentioned above.
Regarding the customer support, I have to tell you this is not satisfactory, when a customer asks for help and tells you that this is a show stopper, it cannot take you four days for the first reply and another four for the second.
I apologize for the delay in my replies. We were quite busy in the last days, plus that we do not work during the week-ends.

If you still encounter problems with the above solutions, just let me know.

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

Return to “Common Problems”