MediaCenter Property

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

Use the OSInfo.MediaCenter property to determine whether you are working under Windows XP Media Center Edition.

Declaration

OSInfoObj.MediaCenter

Read-Only Property Boolean
OSInfoObj An expression, variable or parameter that specifies a reference to an OSInfo object

Applies To

The property is applied to the following object:

Property Value

True if you are working under Windows XP Media Center Edition; false otherwise.

Example

The following example checks whether the operating system is running under the Media Center Edition.

JavaScript, JScript

function OSInfoSample()
{
  …
  // Obtains the OSInfo object
  var OSInfo = Sys.OSInfo;
  // Checks whether the operating system is WinXP Media Center
  if (OSInfo.MediaCenter)
  {
    Log.Message("The operating system is Windows XP Media Center Edition");
    …
  }
  …

}

Python

def OSInfoSample():
  # ...
  # Obtains the OSInfo object
  OSInfo = Sys.OSInfo
  # Checks whether the operating system is WinXP Media Center
  if OSInfo.MediaCenter:
    Log.Message("The operating system is Windows XP Media Center Edition")
    # ...
  # ...

VBScript

Sub OSInfoSample

  …
  ' Obtains the OSInfo object
  Set OSInfo = Sys.OSInfo
  ' Checks whether the operating system is WinXP Media Center
  If OSInfo.MediaCenter Then
    Log.Message "The operating system is Windows XP Media Center Edition"
    …
  End If
  …

End Sub

DelphiScript

procedure OSInfoSample();
var OSInfo;
begin
  …
  // Obtains the OSInfo object
  OSInfo := Sys.OSInfo;
  // Checks whether the operating system is WinXP Media Center
  if OSInfo.MediaCenter then
  begin
    Log.Message('The operating system is Windows XP Media Center Edition');
    …
  end;
  …

end;

C++Script, C#Script

function OSInfoSample()
{
  …
  // Obtains the OSInfo object
  var OSInfo = Sys["OSInfo"];
  // Checks whether the operating system is WinXP Media Center
  if (OSInfo["MediaCenter"])
  {
    Log["Message"]("The operating system is Windows XP Media Center Edition");
    …
  }
  …

}

See Also

FullName Property
Name Property
Edition Property
Windows64bit Property
Version Property
ServicePackVersion Property
TabletPC Property

Highlight search results