Search the Community
Showing results for tags 'decimals Numbers'.
-
Hello, I have a program that checks the registry for specific applications and reads the version number of that program. The version of that application is then compared to the latest release on our network, and if the version number is older, then the application is flagged for requiring an update. So as an example, the latest version of Flash has a version number of, 11.2.202.233. If the version I had on the network is 11.2.202.234, the program should change a value in my list to say "Update required". The problem is that the program doesn't seem to recognise multiple decimal points as a number for obvious reasons. The trouble is if I compare strings I am not going to be getting an accurate reading. For example if a user had Flash 11.2.202.233, and I haven't updated it yet on the network and am still on 11.2.202.200, it doesn't recognise that the version number is less, because the first digits are still 11.2. If it always went 11.2, 11.3, 11.4 etc it wouldn't be a problem. So this is what I have right now: For $w = 1 To 500 $AppKey = RegEnumKey($uRegKey, $w) If StringInStr(RegRead($uRegKey & "\" & $AppKey, "DisplayName"), $iUpdate[$z][0]) Then $uVer = RegRead($uRegKey & "\" & $AppKey, "DisplayVersion") _GUICtrlListView_AddSubItem($listSoftware, $z - 1, $uVer, 2) EndIf Next If $uVer = "" Then _GUICtrlListView_AddSubItem($listSoftware, $z - 1, "Not installed", 3) ElseIf $uVer < $iUpdate[$z][1] Then _GUICtrlListView_AddSubItem($listSoftware, $z - 1, "Update required", 3) ElseIf $uVer > $iUpdate[$z][1] Then _GUICtrlListView_AddSubItem($listSoftware, $z - 1, "Installed", 3) Else _GUICtrlListView_AddSubItem($listSoftware, $z - 1, "Installed", 3) EndIf $uVer = "" So to summarize. How can I read this, 11.2.2.2, as an Integer? Thanks. Jeff