Patch installation and preserving ini file values - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Patch installation and preserving ini file values

Hi

Please can you clarify how Patch installations work with ini files ?

I had understood from the Windows Installer SDK that patch installations "preserve user customizations through the upgrade" and I understood from this that ini file settings will not be altered by the application of a patch.

So I was disappointed to find the ini file settings are in fact altered by the application of a patch.

The installer contains public properties that are set either on the command line, installer screen, or by Searches and then applied to the ini file. e.g. the property INI_SETTING_1 is given a value during the installation of the MSI file and then inserted into the ini file, for example in
[MySecion]
MySetting=[INI_SETTING_1]

What is happening during the application of a patch is that the default MSI value given to the property INI_SETTING_1 is overwriting the customer specific value in the ini file after the patch is applied.

My quesion is, how do I prevent default property values from overwriting customer specific settings ?

Thanks,
Alastair
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Patch installation and preserving ini file values

Hello,

Simply back-up then restore the INI after the install finishes. Other users encountered this difficulty, the matter has been discussed in the following topic:
http://www.advancedinstaller.com/forums ... ore#p25216

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Alastair
Posts: 42
Joined: Tue Jul 14, 2009 9:54 am
Location: UK

Re: Patch installation and preserving ini file values

Thanks Gabriel,

I see the solution now and have custom actions that make the appropriate backup and restore of ini files. The Execution condition for the custom actions is AI_PATCH, so I expect it will all work ok.

Thanks for your help on this.

Kind regards,
Alastair

Return to “Common Problems”