Sign in to follow this  
Followers 0
DaLiMan

FileGetVersion

3 posts in this topic

Hi there,

I use FileGetVersion to distribute my script from a server.

Until now I did not have any problems, but I didn't reached subversion "10" yet.

Now after testing I wanted to put v.3.1.10.0 on the server but according to Auto-It v.3.1.9.0 is higher. :D

So my question is....... what am I to do.

Of course v.3.2.0.0 should fix my problem, but I don't want to go there yet. :idiot:

Please help.

Share this post


Link to post
Share on other sites



You will have to split the numbers up by the decimal places. In a real number or fraction, there is never more than one decimal point. Therefore, AutoIt is not the problem here, but your implementation of the obvious.


Who else would I be?

Share this post


Link to post
Share on other sites

Found a solution using StringSplit.

Dim $Versie = "3.1.10.0"
Dim $Versie2 = FileGetVersion("\\NLF18S01\NLF18$\CQR\Setup\SetupCQR.exe")
;
; Controle Script Versie-stand :
Dim $v1 = StringSplit ( $Versie, "." )
Dim $Versie1 = $v1[1]*1000000 + $v1[2]*10000 + $v1[3]*100 + $v1[4]*1
Dim $v2 = StringSplit ( $Versie2, "." )
Dim $Versie2 = $v2[1]*1000000 + $v2[2]*10000 + $v2[3]*100 + $v2[4]*1

If $Versie1 < $Versie2 Then
   $MsBox = MsgBox(4, "CQRinvuller © versie check", "Uw versie is "& $Versie & @CRLF & "De huidige versie is "& $Versie2 & @CRLF & @CRLF & "Wilt u de nieuwe versie nu installeren of doet u het later zelf.")
   If $MsBox = 6 Then
      Run("\\NLF18S01\NLF18$\CQR\Setup\SetupCQR.exe")
      Exit
   EndIf
EndIf

Probably not the most neat but it works. (for now) :idiot:

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
Sign in to follow this  
Followers 0