p35t173nc3
Posts: 33
Joined: Wed Apr 02, 2008 1:20 pm

Write INI files during Rollback

How can I write out the defined INI files during a rollback operation (as they would normally be written during the installation?)

Basically, I have my INI files which contain information gathered during the first installation. When the user upgrades to a new version I read these INI files back into the running installation and skip those sections (i.e. I don't ask the user for that information again.)
But when upgrading if a problem occurs that causes the installation to rollback, the INI files have been deleted and I would very much like them to remain so that settings are not lost (so the user need not recapture them.)

Thank you.
Daniel
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Write INI files during Rollback

Hi Daniel,
But when upgrading if a problem occurs that causes the installation to rollback, the INI files have been deleted
Please note that when performing an upgrade the previous version is completely uninstalled and then the installation of the new one starts (of course depending on the order set in the Upgrades page).

However, if the old package is uninstalled first and then the new one starts the installation and fails the rollback will not be able to reinstall the old application, therefore your INI file will be lost too, along with all the resources
from the application. The rollback will only take place for the actions from the new package, not for the one that was previously installed on the machine.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
p35t173nc3
Posts: 33
Joined: Wed Apr 02, 2008 1:20 pm

Re: Write INI files during Rollback

Hi, I am aware of the ordering. I have available, from reading the ini files, all the information that the ini files contained before the previous package was uninstalled. I was hoping to be able to perform the same action that writes the ini files during normal installation, during the rollback. Would this be possible?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Write INI files during Rollback

Hi Daniel,
I was hoping to be able to perform the same action that writes the ini files during normal installation, during the rollback. Would this be possible?
This probably can be done using a custom action to write your INI file at the desired location. However it is not recommended since the previous version of the package was already completely
uninstalled, only the INI file would remain.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
p35t173nc3
Posts: 33
Joined: Wed Apr 02, 2008 1:20 pm

Re: Write INI files during Rollback

Hello Bogdan, that is exactly what I want; so that when the user attempts to reinstall I can pick up their previous settings and re-use them.

Is there any way that I can call the standard action that writes the ini files during the rollback?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Write INI files during Rollback

Hi Daniel,
Is there any way that I can call the standard action that writes the ini files during the rollback?
I'm afraid this cannot be done. You will need to create your own custom action that writes the INI file
and mark it so it is executed only during rollback.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”