Jump to content
DigDeep

Unable to read variable with multiple decimal points

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

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


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...