richardstephens
Posts: 2
Joined: Sat Aug 03, 2019 8:40 am

MSI not overwriting existing file

Mon Aug 05, 2019 9:03 am

I created a small app that copies an MDE file into a certain folder in program files. the new MSI has no problem overwriting a file that was created with a previous version of the program. but some people have copied a new mde into the folder manually. now, when the new MSI is run, it will not overwrite the pre-existing file (that was copied manually) h0w do I fix this? there are no errors either. it runs, but does not copy the new MDE into the folder.

Catalin
Posts: 6543
Joined: Wed Jun 13, 2018 7:49 am

Re: MSI not overwriting existing file

Wed Aug 07, 2019 1:58 pm

Hello Richard and welcome to Advanced Installer forums,

I have tried to test this using a .txt file and everything worked as expected - on Advanced Installer 16.2. Here is how I proceeded:

1. created a project which contained a .txt file containing "123" in it.

2. build and install

3. created a new .txt file, with the same name, containing "1234" in it and replaced the one from the installation folder.

4. updated the .txt file from my setup to contain "123456", increased the version and installed it over the previous version.

5. after installation, I have checked the installation folder and the .txt file was overwritten.

Could you please check the following:

1. double click on your file (in the "Files and Folders" page) --> "Operations" tab --> make sure either "Overwrite only if the existing file is older" or "Always overwrite existing files" options is ticked.

2. make sure the MDE files have the same name. If the users have replaced + renaming the file, then yes, it is normal that it does not get overwritten.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”