Newer file with lower version - none installed - Advanced Installer Community

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!

Roelof
Posts: 3
Joined: Fri Jan 09, 2009 3:58 pm

Newer file with lower version - none installed

Hello,

We made an installer containing a newer version of one of the DLLs, but with a lower version number. When running this installer as an update, I would expect the versioning rules to result in the old DLL being left alone.
However, the installer deletes the old DLL, and doesn't install the newer/lower versioned one either - resulting in an incomplete installation! Is this a bug in Advanced Installer?

And yes, I reproduced it with a simple sample project, containing 2 files (one in an application folder and one in a custom folder; the following happens to both).
First install base kit:
test.exe version 2.2.0 filedate 20080101
Then install upgrade, containing
test.exe version 2.1.0 filedate 20080102
=> system contains neither 2.2.0 nor 2.1.0

If the version of the newer file is identical to the version of the file already on the system, the newer file replaces the older one (I would expect the versioning rules to result in the old file being left alone).
If the newer file has a higher version, everything works as expected.

Best regards,
Roelof
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Newer file with lower version - none installed

Hi Roelof,

Please note that during an upgrade the old version is uninstalled completely and the new version is installed. Since the new version of the package contains a lower version of the DLL, the DLL will not be installed. Therefore, after the old version is removed, the DLL will be absent. This is the normal Windows Installer behavior.

If you want to keep the original DLL you can use the "Never Overwrite" and "Permanent" attributes for the component of the DLL in the original package. This way the upgrade process will not uninstall or overwrite the original DLL.

Another solution would be to backup the DLL before the upgrade and restore it at the end. Please note that the User Guide contains the Preserve files on install how-to which may help you.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Roelof
Posts: 3
Joined: Fri Jan 09, 2009 3:58 pm

Re: Newer file with lower version - none installed

Hello Cosmin,

Thanks for your reply. I am a bit surprised - is this really normal behaviour for the installer?
Because, it doesn't make sense to me. Either you decide to replace the file with a newer version, or you don't - but in the latter case, I would expect the old file to be left alone.
I cannot imagine that this behaviour can ever be what one wants - it is certain to ruin your installation! Of course, you should take care to always increase, not decrease, your file version for newer versions. But, taking the versioning rules into consideration, I would expect the highest version file to be on the system in the end. Seems the most intuitive and logical (and safe!) to me.

But - is this behaviour part of Advanced Installer, or is it part of MSI? In the latter case, I should be putting this to someone else..

Best regards,
Roelof
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Newer file with lower version - none installed

Hi,

Unfortunately, this is the way Windows Installer manages major upgrades. You can read more about it here: Major Upgrades.
If you need to keep the original installation and update only a couple of files, you can use a patch.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Roelof
Posts: 3
Joined: Fri Jan 09, 2009 3:58 pm

Re: Newer file with lower version - none installed

I feared you would say this! But, thanks for your answers.

Best regards,
Roelof

Return to “Common Problems”