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!

MrJul
Posts: 3
Joined: Thu Oct 04, 2012 10:13 pm

Problem using preserve file contents

Hello,

First of all, thank you for your great product.

I'm currently trying to make the "preserve file contents" feature to work, to no avail.

What I'm trying to do
I have a configuration file that I want to preserve between upgrades. This file is installed as its own component. In the properties dialog for this file, "preserve file contents" is checked and the condition is, for now, "1", meaning the file should always be preserved, whatever the uninstall mode is. (I'll change it to OLDPRODUCTS later once I got this working).

What happens
Every time I'm doing anything that uninstalls the old version (full uninstall or upgrade), the old file is deleted, then reinstalled (in case of an upgrade). It seems that the "preserve file contents" option is ignored.

What I tried
  • I read both File Operations Tab and Prevent Repair or Uninstall. This second link makes me believe that something is wrong: the example uses REMOVE=ALL telling it can be used as an alternative to the Permanent flag. That's not what I observe at all. The file is always removed, whether the condition is REMOVE=ALL or even just 1. In contrast, the permanent flag always keep the file. (I can't use it since I ultimately will want a condition (upgrade only), the 1 and REMOVE=ALL were for testing the preserve file behavior).
  • "Ensure that this file overwrites any installer target file" is unchecked.
  • To ensure no other condition or property was interfering, I created a blank new project, added a single file, changed only its "preserve file contents" option, built and ran the project, installed, created a major upgrade and ran the upgrade. The result is exactly the same: the existing file is never preserved.
  • If I check "never overwrite" in the corresponding component properties and perform an upgrade, the old file is still deleted, but the new file isn't installed, as if the check was correctly made before the deletion.
System
Windows 7 SP1 64 bit
Windows Installer 5.0.7601.17807
Advanced Installer 9.5 Trial
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem using preserve file contents

Hello and welcome to Advanced Installer forums,

Indeed, this seems to be an Advanced Installer issue. A fix will be available in the next version of Advanced Installer, thank you for bringing it to our attention. Until then, as a workaround you can mark the related file component as "Never Overwrite" in the upgraded version of your project.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MrJul
Posts: 3
Joined: Thu Oct 04, 2012 10:13 pm

Re: Problem using preserve file contents

Thanks for the quick reply, Daniel.
I'm looking forward to the next version!
DPL
Posts: 2
Joined: Wed Nov 07, 2012 3:55 pm

Re: Problem using preserve file contents

In my case, the latest version 9.6.1 does not resolve above problem. Also, in Edit File under Operations tab, if Do not overwrite existing file check box is selected, it does not stick. The next time it is open, the check box is unselected and condition entry greyed out. Furthermore, if Overwrite only if the existing file is older option is selected and saved, the overwrite behaviour changes to Always overwrite.
Can you please look into it and perhaps come up with some solution. Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem using preserve file contents

Hello,

Sorry, I can't replicate this behavior on a fresh project using Advanced Installer 9.6.1. Are you pressing OK after performing the changes in the dialog?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DPL
Posts: 2
Joined: Wed Nov 07, 2012 3:55 pm

Re: Problem using preserve file contents

Hi Mihai

I've uploaded two files for you to see. First one showing condtion selected and the second one showing previously selected (and okayed) box unchecked. Many thanks for looking into it.
pic1.JPG
pic1.JPG (86.64 KiB) Viewed 4955 times
pic2.JPG
pic2.JPG (85.74 KiB) Viewed 4955 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Problem using preserve file contents

Hello,

Unfortunately I can't replicate the behavior. Can you send us a new project step by step test case?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”