Hi IA Gurus,
I am having some frustrating problems with the 'Install Files UI. Specifically the 'Never Overwrite' and 'Permanent File' options found in the 'Copy Options' frame of the 'Install Files' UI.
No matter what I do, the 'Never Overwrite' and 'Permanent File' options simply do not work. I have looked way back to 2004 for all of the posts on this and the issue has always been a problem for users. It seems as though it has never been addressed. In fact the help file in Version 11 has absolutely no mention of the 'Never Overwrite' or 'Permanent File' options and therefore the IA Help document is utterly useless in terms of gaining insight into how these features should work.
Since this has been a documented problem issue for more than 7 years (!), I am wondering if the problem is a basic lack of understanding as to how these two features operate.
Let me lay the groundwork using an example;
A) Let's say that I created an installation project that installs two files called 'myapp.exe' (version 1) and 'database.mdb'. Since it is the first build and since it did not occur to me at the time, my install does not have the 'Never Overwrite' and 'Permanent File' options enabled for the 'database.exe' file.
B) Now let's say that I go back and update the project a year later now that version 2 of myapp.exe is ready for release. Of course, now with the benefit of hindsight I want to be smart and ensure that the 'database.mdb' file does not get deleted or overwritten since it contains a year's worth of customer data. In order to safeguard the 'database.mdb' file I now enable the 'Never Overwrite' and 'Permanent File' checkbox options. I enable both of these checkboxes since I know that InstallAware will anyways uninstall a project before installing the new update components in version 2 of my install. Doing this will ensure that the customer's 'database.mdb' is safe and will neither be removed during the uninstall nor will it be overwritten during the update install, right?.... HA! WRONG!!!
During the obligatory uninstall the 'database.mdb' gets uninstalled! AURGH!!! (yes, I know...not InstallAware's fault...its the stupid Microsoft Installer technology that IA has to deal with)
But wait a minute... I had the 'Permanent File' option enabled. What gives? Shouldn't that have done what the 'Permanent File' option name entails and protected my 'database.mdb' from being uninstalled? So now, hypothetically, a year's worth of customer data is lost...
Unfortunately, since the IA Help file offers no insight into how the 'Never Overwrite' and 'Permanent File' options work, I can't even make an educated guess as to where the problem lays, but I am wondering if the real issue is that the 'Never Overwrite' and 'Permanent File' options needed to be enabled in my very first install, (step 'A' above), for them to have the desired protective effect during subsequent update uninstalls/installs. Is is possible that enabling the 'Never Overwrite' and 'Permanent File' options in my version 2 installation (step 'B' above), is too late to have an effect on prior installs that were created without this option already having been enabled?
Perhaps this is not the case, but if it is, how can I deal with such a situation? Even better, InstallAware can you please deal with this problem programmatically since the posts dating back to 2004 show that this is a very much a real world issue that your customers have experienced and are still struggling with today?
Thanks in advance
-Steve
Copy Options -Never Overwrite and Permanent File
Re: Copy Options -Never Overwrite and Permanent File
Dear Steve,
I understand your frustration. Unfortunately, there is no option to achieve this retroactively - the files must have been marked permanent in your first installer (A).
What I would recommend doing is first thing in your B installer check if A is installed. If it is, backup the file before removing A..
I understand your frustration. Unfortunately, there is no option to achieve this retroactively - the files must have been marked permanent in your first installer (A).
What I would recommend doing is first thing in your B installer check if A is installed. If it is, backup the file before removing A..
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Copy Options -Never Overwrite and Permanent File
Hi Aviv,
Thanks for this information... I thought that this might be the case.
If I may be blunt, I find that this is a good example of where the InstallAware documentation is lacking. I wish that it would just clearly state something like: ' Think carefully about what files you want to protect or prevent from being overwritten, since these settings cannot be applied retroactively in order protect files and components that are already present on the system.'
Looking back through other posts on this subject, I think that this is exactly the problem that people where encountering because they made the same Incorrect assumption that I had been making... I now realise that I did not understand how InstallAware is making the decision to overwrite or delete. It was my belief that when I enabled the 'permanent' and/or 'never overwrite' checkbox on a file in my project, I was defining how InstallAware should be dealing with the installation of the particular file. In other words, I thought that it was defining how InstallAware should behave WHILE installing the component. I now realise the what the 'permanent' and 'never overwrite' options really do is control how those files should be dealt with AFTER the files have been installed. Thus the 'permanent' and 'never overwrite' options only take on the effect of protecting the files from deletion or overwrites during subsequent installations.
I am wondering however, if there might be another approach...
If IA is able to flag those files to be 'permanent' somewhere in the registry during an install, I am assuming that perhaps it would be possible at the beginning of my install set the 'permanent' and 'never overwrite' values to be enabled for the file that already exists on the system from my prior install. If I could make this correction at the start of my installation I would be able to correct the problem and thus protect the file from being deleted.
Any idea as to how this could be accomplished?
Thanks,
-Steve
Even better, could IA development not provide the option to simply protect files from overwrite or deletion DURING the install. I would seem to me that this would perhaps not be too difficult... if the checkbox is enabled and the file already exists on the target, don't install it and don't delete it regardless of the file's version number.
Thanks for this information... I thought that this might be the case.
If I may be blunt, I find that this is a good example of where the InstallAware documentation is lacking. I wish that it would just clearly state something like: ' Think carefully about what files you want to protect or prevent from being overwritten, since these settings cannot be applied retroactively in order protect files and components that are already present on the system.'
Looking back through other posts on this subject, I think that this is exactly the problem that people where encountering because they made the same Incorrect assumption that I had been making... I now realise that I did not understand how InstallAware is making the decision to overwrite or delete. It was my belief that when I enabled the 'permanent' and/or 'never overwrite' checkbox on a file in my project, I was defining how InstallAware should be dealing with the installation of the particular file. In other words, I thought that it was defining how InstallAware should behave WHILE installing the component. I now realise the what the 'permanent' and 'never overwrite' options really do is control how those files should be dealt with AFTER the files have been installed. Thus the 'permanent' and 'never overwrite' options only take on the effect of protecting the files from deletion or overwrites during subsequent installations.
I am wondering however, if there might be another approach...
If IA is able to flag those files to be 'permanent' somewhere in the registry during an install, I am assuming that perhaps it would be possible at the beginning of my install set the 'permanent' and 'never overwrite' values to be enabled for the file that already exists on the system from my prior install. If I could make this correction at the start of my installation I would be able to correct the problem and thus protect the file from being deleted.
Any idea as to how this could be accomplished?
Thanks,
-Steve
Even better, could IA development not provide the option to simply protect files from overwrite or deletion DURING the install. I would seem to me that this would perhaps not be too difficult... if the checkbox is enabled and the file already exists on the target, don't install it and don't delete it regardless of the file's version number.
Re: Copy Options -Never Overwrite and Permanent File
Hey Steve,
I totally understand where you are coming from. I definitely see how this is confusing!
That being said, when files are marked permanent, they files themselves become permanent.
When you upgrade, your old version simply uninstalls, without being aware of the fact that its being upgraded. Since the files weren't marked permanent in the old installer that is being uninstalled, there is no reason for the files to be permanent.
This is actually pretty straight forward design-wise, since files that are permanent should be marked as such from the first version of the installer.
Again, I understand that this is confusing, and that the documentation might be a little misleading.
In any case, there is no way to retroactively mark files as permanent, hence my creating a backup solution.
Thank you.
I totally understand where you are coming from. I definitely see how this is confusing!
That being said, when files are marked permanent, they files themselves become permanent.
When you upgrade, your old version simply uninstalls, without being aware of the fact that its being upgraded. Since the files weren't marked permanent in the old installer that is being uninstalled, there is no reason for the files to be permanent.
This is actually pretty straight forward design-wise, since files that are permanent should be marked as such from the first version of the installer.
Again, I understand that this is confusing, and that the documentation might be a little misleading.
In any case, there is no way to retroactively mark files as permanent, hence my creating a backup solution.
Thank you.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
Obliterator
- Posts: 53
- Joined: Fri May 01, 2009 11:54 am
Re: Copy Options -Never Overwrite and Permanent File
As giaviv points out your only hope for recovery now is to backup the desired files during installation (before your previous version is uninstalled).
This should be straight forward, but I wanted to offer a word of caution... Somebody feel free to correct if my advice is wrong!
You may not be able to use the windows installer copy file commands in IA - as even though you might sequence them before uninstallation - they effectively get queued - they don't get executed until the Apply Install command is issued in your script. This means the copy commands may not actually get executed until installation part of your setup - i.e. after the uninstalltion has completed (when its too late).
Possible workarounds for this problem are to use the native mode copy file commands (if you have IA10+), or to call the system kernel copy commands via a DLL call. I believe you could also add another Apply Install command earlier in your script to flush the Windows Installer queue (but I seem to recall the help advises against this strategy).
Finally, in regards to your comment:
But just to be clear for others, it is my understanding the 'never overwrite' controls what happens DURING install time NOT AFTER. i.e. it means THIS installer will not overwrite a previous version of the file if it exists, but it will offer no protection against a future version of setup doing so (should the 'never overwrite' option be later removed in subsequent installers).
This should be straight forward, but I wanted to offer a word of caution... Somebody feel free to correct if my advice is wrong!
You may not be able to use the windows installer copy file commands in IA - as even though you might sequence them before uninstallation - they effectively get queued - they don't get executed until the Apply Install command is issued in your script. This means the copy commands may not actually get executed until installation part of your setup - i.e. after the uninstalltion has completed (when its too late).
Possible workarounds for this problem are to use the native mode copy file commands (if you have IA10+), or to call the system kernel copy commands via a DLL call. I believe you could also add another Apply Install command earlier in your script to flush the Windows Installer queue (but I seem to recall the help advises against this strategy).
Finally, in regards to your comment:
As you note, the 'permanent' option controls what happens AFTER install (i.e during uninstall).I now realise the what the 'permanent' and 'never overwrite' options really do is control how those files should be dealt with AFTER the files have been installed.
But just to be clear for others, it is my understanding the 'never overwrite' controls what happens DURING install time NOT AFTER. i.e. it means THIS installer will not overwrite a previous version of the file if it exists, but it will offer no protection against a future version of setup doing so (should the 'never overwrite' option be later removed in subsequent installers).

