DigDeep Posted April 10, 2019 Share Posted April 10, 2019 I am having a weird scenario. I have an INI file which has the result... App1=10.0.9425.6254 and on the local machine, the application version say is 10.0.10224.63255 Using the below code is always giving the incorrect result as "Updated". For some reason it looks like code is only reading the 1st decimal and is not looking at the 2nd and 3rd decimal. Can someone help? Local $ServerVer = IniRead("c:\TEST\test.ini", "Results", "App1", "") Local $LocalVer = FileGetVersion("FilePath", "ProductVersion") Select Case $LocalVer < $ServerVer MsgBox(0, '', $LocalVer & " < " & $ServerVer) Case Else MsgBox(0, '', "updated") EndSelect Link to comment Share on other sites More sharing options...
Developers Jos Posted April 10, 2019 Developers Share Posted April 10, 2019 Why do you think you can do a less than comparison on a none numeric value? A version number is not a number but rather 4 level number. That is why there is a _VersionCompare() UDF available! Check the helpfile for details. Jos DigDeep 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
DigDeep Posted April 10, 2019 Author Share Posted April 10, 2019 (edited) @Jos, this is great. Thanks Edited April 10, 2019 by DigDeep Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now