Skip to content
⌘ NSIS Forum Archive

compare file version

8 posts

jammusi#

compare file version

I want to compare two files versions numbers - in order to know whether to replace a certain dll or leave the current one.

Using the macro GetFileVersion i receive the two versions' numbers from both files.

Now i need to actuallt compare the two numbers.
I am looking for another macro or something else that will be able to compare it correctly. I can not find. I always can parse the two numbers and compare it myself - but ...

does anyone know how to do that?

Tx

Jammusi
jammusi#
it doesn't really works OK
for instance:

Comparing 0.9.81.70 with 0.9.8.7
returns 0 - meaning equal.

Am i right?
MSG#
If it's the same code as that of two years ago (which at first glance appears to be just the case), then yeah it doesn't do >9 sub-version numbers. Feel free to edit the macro and share. :-)
jammusi#
Well - I'm new to NSIS so i wouldn't know what was two years ago ;-)

for the same reason I still don't know how to right a macro and how to publish it later.

I will try to do that

tx
jpderuiter#
What version of NSIS are you using?
I just tested your version numbers and several others, and the result is as expected.

My version of the Word Functions Header is v3.3.
jammusi#
that's weird. I'm using the same Word function header
My NSIS version is 2.4

How could that happen?