Jump to content

Version Check bug... or is it me.


dcjohnston
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...