How to Add Files to a Feature - Advanced Installer Community
trims30
Posts: 15
Joined: Sun Jan 17, 2010 8:04 pm

How to Add Files to a Feature

I have a directory Tree of several folders containing 177 files that I want to be "Permanent" and "Never Overwrite"

Can't figure out how to move entire directory structure to a "Feature".
Need some assistance on this please!

I see all the files in Organization - Main Feature - and I can create a New Feature for my files.
Must I move each file in the directory tree (one by one) to the New Feature or is there a way of moving the entire tree to the Feature?

Lee
trims30
Posts: 15
Joined: Sun Jan 17, 2010 8:04 pm

Re: How to Add Files to a Feature

OK - Found that once I created a Feature, the feature name appears in a drop down on the Files/Folders panel and I can select Current Feature.
With Feature selected I can add my Directory structure and all files to the Current Feature.
Now, how do I set Component Properties for all files in the Feature? Need "Permanent" and "Never Overwrite" properties.

Can do one at a time but have 177 to do - all the same in that Feature.

Should be way to do all at one time.???

Lee
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to Add Files to a Feature

Hello Lee,
Now, how do I set Component Properties for all files in the Feature? Need "Permanent" and "Never Overwrite" properties.
The Organization view uses a native TREE control that does not support multiple selection. For an workaround, please follow the steps from the Select multiple components in the Organization view article.
OK - Found that once I created a Feature, the feature name appears in a drop down on the Files/Folders panel and I can select Current Feature.
With Feature selected I can add my Directory structure and all files to the Current Feature.
To move existing files to a new feature, you can select those files and from their context menu options you can select the Move To Feature... option. Use the below image for your reference:
MoveToFeature.png
MoveToFeature.png (16.86 KiB) Viewed 8229 times
Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
trims30
Posts: 15
Joined: Sun Jan 17, 2010 8:04 pm

Re: How to Add Files to a Feature

Dan:
Thanks for the response.
I was going to use Features to prevent files from being deleted when upgrading an install.
After thinking about it I realized it was not the best solution.

My issue of concern is the following...

Doing a major product revision - the installer deletes all old files and installs new files .
Have had reports from our customers that some files are not getting installed.

Looked at MSI Log from one of my customers and see the following log entry:
MSI (c) (F0:1C) [12:40:06:732]: Disallowing installation of component: {07589A78-3F69-4610-866F-8C8B0406E096} since the same component with higher versioned keyfile exists

Logfile shows file was there and was deleted....

MSI (s) (88:78) [12:40:59:672]: Executing op: FileRemove(,FileName=w3dbsmgr.exe,,ComponentId={07589A78-3F69-4610-866F-8C8B0406E096})
RemoveFiles: File: w3dbsmgr.exe, Directory: C:\PVSW\bin\
MSI (s) (88:78) [12:40:59:672]: Verifying accessibility of file: w3dbsmgr.exe

Clean install of new version works fine. Version upgrade works on most systems - my XP, Vista, Win7 and Win10 machines work without error.
Those failing systems drop the same 32 files. They never get copied after being deleted.
Doing an Uninstall of old system and install of new system works - just failing on some machines when installing new system on top of old one.

Any idea as to whats causing the items to be disallowed? How do I correct it?
Why does msiexec say there is a higher versioned file?

Lee
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to Add Files to a Feature

Hi Lee,

Usually, this behaviour occurs when performing an upgrade for versioned files (e.g. .DLLs, .EXEs, etc) when the file from the destination folder has a higher version than the source file.

The upgrade process performs the following actions:
  • Detect and completely remove older products. During this operation the file will be removed from the machine.
  • Install the new product. The file from the upgraded version will not be installed since its component was not marked for installation.
To overcome this behaviour, you can enable the Always overwrite existing file option from the File Operations Tab of the File Properties.

Please let us know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
trims30
Posts: 15
Joined: Sun Jan 17, 2010 8:04 pm

Re: How to Add Files to a Feature

Dan:
Don't have File Operations Tab on the File Properties panel.
Am using old version of Advanced Installer. (4.3)
Guess it's time to upgrade.
Are my AIP files from 4.3 compatible with current version of Advanced Installer or is there a conversion utility?

Lee
codesynergy
Posts: 100
Joined: Fri Nov 14, 2014 10:29 pm

Re: How to Add Files to a Feature

Just thought I'd chime in on the upgrade issue, as I've run into this issue multiple times before...
  • Generally, you want to make sure your file versions increase each release. I think for non-versioned files, time stamps are used? "Always overwrite existing file" can work around this, but I think it's best to properly version your files.
  • The location of RemoveExistingProducts matters. Personally, I recommend moving it to right before InstallInitialize. I know there are one or two other locations you can move RemoveExistingProducts to, but, in my experience, executing it before InstallInitialize lowers the chance of missing files due to versioning. I know in my version of Advanced Installer (13.2.2), RemoveExistingProducts is located right before InstallInitialize by default. But, it might be different for your version.
  • Dynamically linked folders ("Synchronize content with folder from disk") also comes into play. I can't quite recall the details, but I know there are special keyfile rules when using dynamically linked folders. It's something you might want to look into a bit more if you are using this functionality.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to Add Files to a Feature

Hi Lee,
Are my AIP files from 4.3 compatible with current version of Advanced Installer or is there a conversion utility?
Yes, Advanced Installer is backward compatible. There is no need to use any conversion utility.

@codesynergy:Thank you for your contribution to Advanced Installer forums. I'm sure this will help someone in the future.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”