Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

windows installer versioning rules


3 replies to this topic

limors

limors
  • Members
  • 2 posts

Posted 03 March 2004 - 11:43

Hi,

I made little test in order to understand how windows installer engine decides whether to replace a file.
I took two versions of sample.dll (the size differs).

Very important note in order to understanding the reading:

There are two fields for version in dll (right click the dll and choose properties, select the Version tab).
There is File Version field that you can see in top and real file version that is displayed below under "Other version information".
(Not always it is displayed).
In order to distinguish the fields I will call the last "Real File Version"

Here are the steps I made:
First Scenario:
1. Opened both dlls in Visual studio as a resource and changed the File Version fields to be the same. (2,0,0,0)

2. I created one install that contains 61 kb dll and installed it and created other install with the 65 kb dll and installed it.
Result was OK: the files had not been replaced.

Second Scenario:
1. I changed the Real File Version field of the installed dll (61 kb) to be 1,0,0,0. The other File version field remained 2,0,0,0.

2. I created other install with the 65 kb dll (version 2,0,0,0) and installed it.
Result: File had not been replaced, remained 61 kb with file version 2,0,0,0 and real file version 1,0,0,0.
The assumption is that msiexec engine compares the version from the file table in the msi with other file version (not the real file version).



Third Scenario:
This is in order to prove that msiexec compares the File version in the msi with the file version in destination (not the real file version).
1. I changed the File Version field of the installed dll (61 kb) to be 1,0,0,0. The other File version field was changed to 2,0,0,0.

2. I created other install with the 65 kb dll (version 2,0,0,0) and installed it.
Result: File had been replaced 65 kb with file version 2,0,0,0 and real file version 2,0,0,0.

Those scenarios prove that windows engine refers the displayed file version and not the real file version, I see this as a problem. It should takes the real file version which is numeric and not string.
What do you think?
Attached is jpg of the file properties in order to clarify the two fields.
Any help would be appreciated. rolleyes.gif

Thanks,
Limor

Edited by limors, 03 March 2004 - 11:46.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 03 March 2004 - 23:08

Your observations don't match my understanding of the docs and my experience with MSI. I'm very sure that it uses the rela version, not the string version, as the latter is not even guaranteed to be numerical.

Did you generate a log file of your tests? This this indicate how MSI performs the version comparison.

You should not change the version of the DL after you instaleld it. Instead build a new setup and start each test on a fresh OS. Otherwise you may get ramdom issues with auto-repair.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 04 March 2004 - 05:50

I agree with stefan, Definetly run with log mode on - msiexec /I <msifile.msi> /L*V c:\msilog.txt

This will tell you what versions the msi has detected and how it has decided its logic.

limors

limors
  • Members
  • 2 posts

Posted 04 March 2004 - 09:24

Thanks,
I will try that smile.gif