CProbst
Posts: 4
Joined: Tue Jul 15, 2008 1:52 pm

Need: Do not overwrite existing file

I need a way to leave files untouched by msi when they allready exist - regardless from where they came.
An option like 'Don't overwrite existing file' beneath the "On Install" section of the file propertys.

Thanks
Christian
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Need: Do not overwrite existing file

Hi Christian,

I'm not sure if this is supported by Windows Installer. However, we will investigate to see if it can be done (perhaps with a built-in custom action). Thank you for your suggestion.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
steff
Posts: 6
Joined: Tue Aug 19, 2008 8:30 am

Re: Need: Do not overwrite existing file

Hi,
Has this ever been solved ? Because I need the same function.
Thanks
Steff
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Need: Do not overwrite existing file

Hi,

Advanced Installer doesn't have built-in support for this. However, it could be done through some custom actions. For more details please see the Preserve File on Install how-to.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
steff
Posts: 6
Joined: Tue Aug 19, 2008 8:30 am

Re: Need: Do not overwrite existing file

I think AI has a very complex way of handling this. Why not using a new (feature) property "never overwrite", like in installshield ? Until now I found AI a very good (and easier) alternative for Installshield , but reading this means that I have no solution for the many files in the several directories I need to install, dependent if they already exist on the system.

Is there no better solution ? Is it planned to introduce this ?

Regards
Steff
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Need: Do not overwrite existing file

Hi,
Why not using a new (feature) property "never overwrite"
Please note that this is already supported by the components in the Organization page. However, this attribute refers to future installations (when a package will try to overwrite the component) not to older ones.

Windows Installer doesn't offer this type of support for the already installed files, so the only solution is some custom code.
Is there no better solution ?
The solution is the approach recommended by Microsoft:
- in the original package mark the components with the "Never Overwrite" attribute
- when a newer installation tries to overwrite them Windows Installer will see this attribute and the original files will not be replaced
Is it planned to introduce this ?
We will consider including this feature for already installed files not marked with "Never Overwrite" in a future version of Advanced Installer. Searching for installed files and conditioning components based on these searches will significantly increase the installation time (for example, an installation with 100 files would require 100 searches to determine which files will be installed). Therefore I'm not sure if we can find an acceptable implementation of this feature.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
steff
Posts: 6
Joined: Tue Aug 19, 2008 8:30 am

Re: Need: Do not overwrite existing file

Hi Cosmin,

Thank you for your clear answer

Regards
Stef
CProbst
Posts: 4
Joined: Tue Jul 15, 2008 1:52 pm

Re: Need: Do not overwrite existing file

I would strongly prefer an included function in AI to avoid overwriting or simply changing
file properties like date of modification - which backup and restore do.

I think you have developed AI for better and easier usage of windows installer functionality.
Therefor you cannot always point on it and say this is not supposed by Microsoft. If its not
included - wrap it.

Please!

Christian
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Need: Do not overwrite existing file

Hi Christian,

Although it offers an easier way of creating installation packages, Advanced Installer still uses the Windows Installer engine. This means that there are some rules and best practices which affect the features offered by Advanced Installer.

Like I explained in one of my previous posts, it much more easier (and recommended) to handle this through the original version of the package (determine which files should not be replaced and mark their components with "Never Overwrite"). Also, checking each file to see it it needs to be installed or not would increase the installation time.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”