Vic,

I can think of a three quick ways to verify you are at least 7.5.1.

1) Look for at least 2 periods in the Version. Versions prior to 7.5.1 are guaranteed to only have one period. Versions from 7.5.1 and on are guaranteed to have at least 2 periods

if InStr(Version, ".") <> 0 and InStr(Version, ".") <> InStrRev(Version, ".") then
    ' we are at least 7.5.1
else
    ' we are prior to 7.5.1
end if

2) Try to get the a Version object and if it fails you are pre 7.5.1

Set x = Nothing
On Error Resume Next
set x = ClientInformation.ScriptProcess.Version
On Error Goto 0
if x is Nothing then
    ' we are prior to 7.5.1
else
    ' we are 7.5.1 or newer
end if

3) Just see if you have a prior to 7.5.1 version by checking specifically for previous versions.

if InStr(Version, "7.0) or InStr(Version, "7.1") or InStr(Version, "7.2") or Version = "7.5" then
    ' we are prior to 7.5.1
else
    ' we are 7.5.1 or newer
end if


Regards,
Doug

On 6/23/2011 8:12 AM, Vic Beckley wrote:
Hi all,

I have an app that I am writing that requires WE 7.5.1.0. In my app I need
to make sure that 7.5.1.0 is running and, if not, stop the app. With the new
version object, this is a simple process, but I can't use that because
anything prior to 7.5.1.0 will not even have that object. In that case,
would my app error out? How can I write a sub to check for the version and
stop the app for anything less than 7.5.1.0. I know I could check for that
specific version, but I don't want to update it every time a newer version
comes out. You can't do numeric comparisons on the ApplicationVersion
property because it is a string, right? Any suggestions?

Vic



Reply via email to