TaskService.HighestVersion property

For scripting, indicates the highest version of Task Scheduler that a computer supports.

Syntax

TaskService.HighestVersion As Integer

Property value

The highest version of Task Scheduler that a computer supports. The highest version is a value that is split into MajorVersion/MinorVersion on the 16-bit boundary. The Task Scheduler service returns 1 for the major version and 2 for the minor version. Use the CLng function to get the integer value of the property.

Examples

The following code shows how to use the CLng function to get the value of the HighestVersion property.

wscript.echo service.HighestVersion
Test = clng( service.HighestVersion )
If Test <> 65538  Then
    wscript.echo "Fail"

Else
    wscript.echo "Pass"
End If

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll