OSVersion Property

 

Type: String

 

OSVersion returns the version number, as a string, of the user's operating system.  Examples of the OSVersion string for OS X users include "10.6.8" and "10.7.2". Note that Windows also has version numbers which represent the OS type, such as XP, Vista or Windows 8.

 

Tip: See Detecting Operating System Details for examples of the possible values returned by this property.

 

In general, we recommend only obtaining the OSVersion property using the basic version (not performing an extended property test for this property). The basic property check is instantaneous, whereas the extended property check requires BrowserHawk to use Java to perform this test which is much slower in comparison. There are two cases, however, where using the extended property version of OSVersion has an advantage when it comes to testing OS X users: 1) With Firefox on OS X the basic version of OSVersion will only return the version in x.y format, such as "10.7" and not "10.7.2", and 2) With Opera version 10 and earlier on OS X, no OSVersion information is available with the basic property version.  If these cases are very important to you, use the extended property version. Otherwise the basic version will provide the same results, but much faster.

 

Note: If using the extended property version, you must call the GetExtPropertiesEx method before checking the value of this property. This property requires the Enterprise Edition of BrowserHawk.

 

Note: The OSVersion property is returned as a string. For  numeric comparisons, such as checking to see if a version is greater than a certain version, you may find BrowserHawk's CompareVersion helper function useful.

 

Example of basic property usage (recommended):

<% set bhObj = Server.CreateObject("cyScape.browserObj")

response.write "Your OS version is: " & bhObj.OSVersion

%>

 

 

Example of extended property usage:

<% set bhObj = Server.CreateObject("cyScape.browserObj")

bhObj.SetExtProperties "OSVersion"

bhObj.GetExtPropertiesEx

response.write "Your OS version is: " & bhObj.OSVersion

%>

 

 

Special notes for this property - applies only if using the extended property version of OSVersion (does not apply to basic version of this property):

 

See Also:

Detecting Operating System Details

Additional Steps Required for Java based properties  (for extended property testing only)

OSName Property

Platform Property

CompareVersions Method