Option to overwrite a "never overwrite" file - 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!

pringsmuth
Posts: 6
Joined: Mon Aug 22, 2011 2:33 pm

Option to overwrite a "never overwrite" file

I have assigned the "Permanent" and "Never overwrite" attributes to the data file of a database. This allows the installation of the data file during the first installation where no data file is present. Subsequent updates replace the code that runs the database but does not replace the data file. This is normally what I want to do and it works very well.

However, once in a while a data file needs replacing for various reasons. My users have difficulty manually trashing a data file.

Is there a way to program Advanced installer to OPTIONALLY overwrite a data file and give warnings that I would program to make sure they understood the consequences?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Option to overwrite a "never overwrite" file

Hi,

In order to achieve this, you can uncheck the "Never Overwrite" flag for that file, but in this case the file will be replaced automatically without asking the user about that.

If you want to warn the user and let him choose to whether keep or overwrite the file, you can follow the steps below:
- go in the "Custom Actions" page, add a "Display message box" custom action, choose the "Yes and No" option from the "Buttons" combobox and copy its output property
- go in the "Files and Folders" page, create a new subfolder under the folder that contains your file and place the new file into that folder
- set the "Install folder content into the parent folder" option for that folder
- select the file from that subfolder and press the "F8" keyboard button to be redirected to its related component
- use the property related to the message box as a condition for that component (i.e. BTN_PRESSED = "IDYES")
- build and run the project

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

Return to “Building Installers”