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!

nlindberg
Posts: 8
Joined: Mon Jun 09, 2014 4:23 pm

Extract INI into C:\Windows, Only if file does NOT exist

I am attempting to package up an application, and all is going well, with one exception. I need to extract an INI file into C:\Windows. Once there and the install is complete, the application writes to that INI file. This works as intended in my testing, however, I do not want that file to be overwritten each time I do an upgrade. Basically I want my MSI to search for the INI file, and if it exists, skip that step in the install. Under Edit File --> Operations, I can see the options to overwrite the file(obviously what I don't want), or do not overwrite file, but I am unsure of which conditions to set in order to leave the file if it already exists.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Extract INI into C:\Windows, Only if file does NOT exist

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can use the "Do not overwrite existing file" option as discussed on the Avoid file removal during upgrade thread.

In this case, if the file will be found on the machine when the application is application is upgraded, it will be backed up before the uninstallation of the old version and restored after the installation of the new version.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
nlindberg
Posts: 8
Joined: Mon Jun 09, 2014 4:23 pm

Re: Extract INI into C:\Windows, Only if file does NOT exist

Thanks! That worked!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Extract INI into C:\Windows, Only if file does NOT exist

You're welcome. I'm glad you got this working.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”