Sign in to follow this  
Followers 0
dcjohnston

Version Check bug... or is it me.

3 posts in this topic

#1 ·  Posted (edited)

OK simply put, I take the version number of an application from the user and compare it to the existing version of an exe called platform.exe file on a server.

Here is some of the code:

$version = InputBox(" upgrade version", "Enter version number", "")

$ver = FileGetVersion("f:\pltrsm\platform.exe")

If $ver = (" & $version & ") Then

MsgBox(0, "Platform", "Upgrade is completed")

MsgBox(0, "Current Version:", $Ver)

elseIf $ver <> (" & $version & ") Then

MsgBox(0, "Platform", "Not upgraded")

MsgBox(0, "Current Version:", $Ver)

EndIf

I setup message boxes and both "$ver" and "$version" show as 11.0.0.0

However the code always goes to the elseif. I know they are identical.

Is this me?

Edited by dcjohnston

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Try

$version = InputBox(" upgrade version", "Enter version number", "")

$ver = FileGetVersion("f:\pltrsm\platform.exe")
If $ver = $version Then 
   MsgBox(0, "Platform", "Upgrade is completed" & @lf & @lf & _
   "Current Version:", $Ver)

elseIf $ver <> $version Then 
   MsgBox(0, "Platform", "Not upgraded" & @lf & @lf & _
   "Current Version:", $Ver)
EndIf

MsgBox(0,'',$ver & ' --VS-- ' & $version);## DEBUG msgbox
Edited by ezzetabi

Share this post


Link to post
Share on other sites

Perfecto,

Thanks for helping out us newbies my friend.

Take care

Dave :ph34r:

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