Upgrade is deleting new files? - Advanced Installer Community
bmckenzie
Posts: 15
Joined: Thu Nov 17, 2016 1:08 am

Upgrade is deleting new files?

We have an installer that is pretty simple. Our install basically installs two files, an exe and and ini file. The exe and ini are not packaged in the MSI, but are kept external "beside" the MSI.

The installer has "Uninstall old version first and then install new version" in the "Application Upgrades" dialog.

So, the installer copies the exe and ini files to a folder something like: "Program Files (x86)\Vendor\MSIInstall".

For a normal MSI install/uninstall everything works great. On an UPGRADE however, the ini file is deleted from the "Program Files (x86)\Vendor\MSIInstall" for some reason?

I assume this is because both the new and old version of the product use the same dir location for the ini file, but I would expect the MSI to copy the exe and ini over to that folder AFTER the previous version of the product is already uninstalled?

Is there a way to force this behavior?

Any help would be greatly appreciated!!
bmckenzie
Posts: 15
Joined: Thu Nov 17, 2016 1:08 am

Re: Upgrade is deleting new files?

I looked at this: http://www.advancedinstaller.com/user-g ... -file.html

And several related pages and I will be honest that this makes absolutely no sense to me. I tried several permutations and combinations of setting my APPDIR folder (and sometimes the ini component) to RemoveFolder with condition set to REMOVE (“ALL”) AND NOTUPGRADECODE or some such, but nothing seemed to work.


Also, I have the problem that existing version of the installer are already in the field, so I can't really affect what the previous version's uninstall does.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Upgrade is deleting new files?

Hello Bill,

I'm not sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

Also, for testing purposes only, can you please open your upgraded setup project, go to "Files and Folders" page, double click on your EXE app file and from"Operations" tab select the "Always overwrite existing file" option? Then just rebuild and test again the upgrade scenario. Let us know how this works.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bmckenzie
Posts: 15
Joined: Thu Nov 17, 2016 1:08 am

Re: Upgrade is deleting new files?

So, we already had "Always overwrite" set. Thanks.

I found the problem and it had nothing to do with the MSI :( Sorry, I didn't realize another component in our setup could cause this problem. So, all is working fine. Thanks!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Upgrade is deleting new files?

You're always welcome Bill. I'm glad you sorted things out.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”