copy ini entries - 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!

fitzi
Posts: 4
Joined: Fri Jul 18, 2008 9:16 am

copy ini entries

Is there a way to save existing ini entries? - To restore them after uninstall.

Example <Original test.ini>

[mysection]
entry=entry1;desc=abcd;name=dfjf;
entry=entry2;desc=dfdf;name=oel;
entry=entry3;desc=asdf;name=ggh;

When i installed my product the ini should like:
[mysection]
entry=entry1;desc=abcd;name=dfjf;
entry=entry2;desc=changedEntry;name=oel;
entry=entry3;desc=asdf;name=ggh;

After uninstallation the entry should restored (only that one entry):
[mysection]
entry=entry1;desc=abcd;name=dfjf;
entry=entry2;desc=dfdf;name=oel;
entry=entry3;desc=asdf;name=ggh;

Is there an easy way to make that?
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: copy ini entries

Hi,

So basically you need to restore the INI file to the state it was in before installing the package. If so, a simple solution would be to create a backup of the INI file during first time install and restore it when the package is uninstalled.

You will find VBScript Custom Actions for achieving this here.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
fitzi
Posts: 4
Joined: Fri Jul 18, 2008 9:16 am

Re: copy ini entries

Hi!
Thanks for your answer.
And is it possible to restore only that one entry? - Because other software products/users could changed entries on the same ini file.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: copy ini entries

Hi,

Perhaps this could be done through a custom action, but I'm not sure how this custom action would look like. Please note that Windows Installer does not offer support for this and we're not aware of any installation package authoring tool which does this.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”