devdas_kamath
21st May 2008 05:44 UTC
compare 2 versions
Dear sir,
i would like to compare 2 numbers which is in the format 100.2.1 and 89.1.0. The format is 3 . (dots) and three values can be any numbers. i am comparing these two versions by removing .(dot)s in vb6 using replace command which replaces dots with spaces. Is there any shortcut in NSIS to compare these numbers just like in vb6 or any other solution will be highly appreciated.
thanks in advance.
regards
Devdas M. Kamath
Red Wine
21st May 2008 05:59 UTC
http://nsis.sourceforge.net/Docs/AppendixE.html#E.1.8
don't forget to include the header FileFunc.nsh and insert the proper macro GetFileVersion for installer un.GetFileVersion for uninstaller.
devdas_kamath
21st May 2008 06:04 UTC
dear sir,
i would like to compare 2 numbers rather getting version from a file. please advice.
thanks
Red Wine
21st May 2008 06:29 UTC
Dear sir,
you may use VersionCompare for this purpose, which is also included in nsis documentation.
http://nsis.sourceforge.net/Docs/AppendixE.html#E.3.16
devdas_kamath
21st May 2008 07:04 UTC
thank you very much. it worked perfectly.