stefan_riediger
Posts: 32
Joined: Fri Feb 18, 2022 4:07 pm

XML is not updated in a "Modify" Maintenance Installation

Dear Advanced Installer Support team,

Problem
After an "Modify" Maintenance Installation the XML is not updated with the modified value

Description
I have attached a simple Project to reproduce the error.
The Project contains an XML file data.xml with an element root/key, where the value is associated with a property [MYVALUE]

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <key></key>
</root>
I have added an Edit field on the VerifyReadyDlg and set the Property Name to [MYVALUE].
The intention is that after the installation, the installation folder contains the data.xml with the value which I have entered in the edit field.

That works perfectly fine.

Now I run the setup a second time and select Modify option on the MaintenanceTypeDlg.
I follow the steps until the VerifyReadyDlg , but now I enter a different value.

The problem is that when I look at the XML file, the value is not updated.

I have attached the project MyApp3.aip.
I'm using Advanced Installer 21.4

I have also made a 15 MB Video. The link is valid until 2024/3/13
https://magentacloud.de/s/GE4SmcoSD2MTdXA
Password:
NxeTKZPB

I have followed the steps on https://www.advancedinstaller.com//user ... uestion256
And also tried different settings, but I didn't get it work.

I hope you can help me.

best regards,
Stefan
Attachments
MyApp3.aip
(17.33 KiB) Downloaded 27 times
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: XML is not updated in a "Modify" Maintenance Installation

Hello Stefan,

That might be happening because the feature that contains the file is not actually "reinstalled" so it overwrites the old value.

To achieve what you want, you can proceed as it follows:

- in "Components" page, move the data.xml component to a new feature, let's call it Data
Screenshot_125.png
Screenshot_125.png (25.79 KiB) Viewed 10074 times

- then, on the "VerifyReadyDlg" dialog, we can add a new event, as it follows:
Screenshot_126.png
Screenshot_126.png (60.53 KiB) Viewed 10074 times

This way, we can ensure that the file is reinstalled and the new value will be there.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stefan_riediger
Posts: 32
Joined: Fri Feb 18, 2022 4:07 pm

Re: XML is not updated in a "Modify" Maintenance Installation

Hi Catalin,

thank you very much. Your instructions work perfectly. :)

best regards,
Stefan
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: XML is not updated in a "Modify" Maintenance Installation

You are always welcome, Stefan!

Glad I was able to assist. :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”