Brahnsuk
Posts: 38
Joined: Thu Feb 10, 2011 6:06 pm

Overwrite File which is "permanent" and "never overwrite"

Hello,

for some components we set the attributes "permanent" and "never overwrite" because we want to keep the these files by an update/upgrade (e.g. v1.0.0 => v1.0.1)
Now for our new main version (eg. v1.0.1 => v2.0.0) we have to overwrite some of these files (which also maybe changed from the user).
I've read about the "File Operation" tab (http://www.advancedinstaller.com/user-g ... s-tab.html) "Overwrite only if the existing file is older". That looks good for our problem, but I don't can see this tab.
So,...

1. Are there any conditions where the tab is invisible? (we use the v8.9 of AI)
2. Today (the installations by our customers) don't have file version-number of the files. I would set the file version to "User specific" = 2.0. Is it possible that AI will overwrite it although the attirbutes are set to permanent and never overwrite?

summarized:
some files should be overwrite if the main version is higher, but not within the same main version... Can someone please help me? If this is not possible with AI settings maybe with a *.vbs or something??

thanks in advance!
Current Version of AI: 16.5
Eusebiu
Posts: 4960
Joined: Wed Nov 14, 2012 2:04 pm

Re: Overwrite File which is "permanent" and "never overwrite

Hi,
1. Are there any conditions where the tab is invisible? (we use the v8.9 of AI)
No, the "File Operations" tab is not invisible. It was added later in Advanced Installer and it is available starting with version 9.4.
2. Today (the installations by our customers) don't have file version-number of the files. I would set the file version to "User specific" = 2.0. Is it possible that AI will overwrite it although the attirbutes are set to permanent and never overwrite?
I'm afraid that Advanced Installer will not overwrite a file if the "Never Overwrite" attribute is set for it.
summarized:
some files should be overwrite if the main version is higher, but not within the same main version... Can someone please help me? If this is not possible with AI settings maybe with a *.vbs or something??
In order to achieve this you can follow the steps below (for this scenario you need at least Advanced Installer 9.4):
- go in the Upgrades page, use the [New Upgrade] button and create an upgrade rule like in the attached image
- go in the "File Operations" tab of the files that you don't want to keep, select the "Do not overwrite existing file (Preserve file content)" option and use the condition: NOT UPGRADE_FILES
- every (only) time the main version of your package is increased (e.g. v1.0.1 => v2.0.0), the "Max. Version" from the created upgrade rule should be also increased (e.g. 1.0 => 2.0)
- build and run the package

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Attachments
Upgrade Rule.png
Upgrade Rule.png (53.81 KiB) Viewed 2757 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”