divyaniP
Posts: 16
Joined: Mon Dec 21, 2020 1:15 pm

create config file again during modify

Mon Apr 12, 2021 12:28 pm

My installer creates a windows installer XML file on the machine after installation.
I want to modify that file using modify option of the installer.
How can I make it happen?

Catalin
Posts: 4430
Joined: Wed Jun 13, 2018 7:49 am

Re: create config file again during modify

Mon Apr 12, 2021 3:55 pm

Hello,

In order to achieve that, you can create a custom action that will update your file (e.g. PowerShell script, VBScript) and set its' "Execution Stage Condition" to only "Maintenance".

This way, you custom action will run only on Maintenance mode. If you want to add a stronger condition, you can use the "Condition" field.

Depending on the location of your file, e.g. if it is installed in "WinDrive:\ProgramFiles", you may also want to set the "Run under the LocalSystem account (no impersonation)" option for your custom action so it has enough rights to modify the file.

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

divyaniP
Posts: 16
Joined: Mon Dec 21, 2020 1:15 pm

Re: create config file again during modify

Wed Apr 14, 2021 7:21 am

Hello,
Thank you for your support.

When we upgrade the installer, files get copied to the destination folder again.
That kind of implementation I want on the Maintainance VerifyReadyDLg Install button.

How can I access that windows installer XML file to copy in the c:\program files folder?
Can we have a way to do that?

Catalin
Posts: 4430
Joined: Wed Jun 13, 2018 7:49 am

Re: create config file again during modify

Mon Apr 26, 2021 3:57 pm

Hello,

First of all, please accept my apologies for the delayed reply (I was off last week due to not feeling so well).
When we upgrade the installer, files get copied to the destination folder again.
That kind of implementation I want on the Maintainance VerifyReadyDLg Install button.
Please note that an upgrade basically consists of two processes:

- the uninstall process of the older version

- the install process of the newer version

This is the reason why the files get copied to the destination folder again.

If you want to deliver a new version of your file, then the best approach would be to go for an upgrade.

The "Maintenance" mode is used post-installation, if the user wants to add, for instance, a feature that he did not add during the first-time install (as explained in the "Maintenance Installation" article).

What you want to achieve may be possible through a Custom Action as I have previously mentioned. For instance, you can have a custom action that downloads the new files and replace the already existing files.

However, I believe it would be better to just go with an upgrade installation, since this is the purpose of it.

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

Return to “Building Installers”