File temporarily replaced during install - Advanced Installer Community
rversteeg
Posts: 4
Joined: Mon Jun 26, 2017 10:53 am

File temporarily replaced during install

I've got an installer that installs and starts an Windows Service. With the application are some config files, where two files have an operation of "Do not overwrite existing file" with condition 1. This is because the user can change the values in these files, and should not be replaced when a new version is installed. For this to work i've chosen the "Install new version first and then uninstall old version".

When the service is started during the setup and reads one of the config files it contains the contents as supplied in the installer files instead of the values that are modified by the user. After restarting the service manually it contains the values as changed by the user.

So it seems that instead of skipping the file's enterily during setup, it first makes a backup of the modified file, than replaces it with the on supplied with the installer, starts the service, and later copies the user modified version back.

How is this possible?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: File temporarily replaced during install

Hi,

Please keep in mind that this is the normal behavior when the "Do not overwrite existing file" option is set. The existing file is backed up when the installation starts and it is restored at the end of it.

If you do not want those files to be replaced, you can go in the "Organization" page and set the "Never Overwrite" flag for the file's related component.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rversteeg
Posts: 4
Joined: Mon Jun 26, 2017 10:53 am

Re: File temporarily replaced during install

Hi Eusebiu,

Thanks for the solution, this fixed my problem. It might be a good idea to make this a bit clearer in the UI, as it is not the behavior I would expect when I see a option "Do not overwrite existing file".

Regards Roy
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: File temporarily replaced during install

You're welcome Roy. I'm glad you solved the problem.

We will consider the suggestion for making the "Do not overwrite existing file" option more suggestive. Thank you.

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

Return to “Common Problems”