MediaCenter Property

Applies to TestComplete 15.40, last modified on July 05, 2022

Description

Use the OSInfo.MediaCenter property to determine whether Windows Media Center is included in your operating system.

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 the operating system that includes Windows Media Center; false otherwise.

Example

The following example checks whether the operating system includes Windows Media Center.

JavaScript, JScript

function OSInfoSample()
{
  …
  // Obtain the OSInfo object
  var OSInfo = Sys.OSInfo;
  // Check whether Windows Media Center is included in your operating system
  if (OSInfo.MediaCenter)
  {
    Log.Message("The operating system includes Windows Media Center");
    …
  }
  …

}

Python

def OSInfoSample():
  # ...
  # Obtain the OSInfo object
  OSInfo = Sys.OSInfo
  # Check whether Windows Media Center is included in your operating system
  if OSInfo.MediaCenter:
    Log.Message("The operating system includes Windows Media Center")
    # ...
  # ...

VBScript

Sub OSInfoSample

  …
  ' Obtain the OSInfo object
  Set OSInfo = Sys.OSInfo
  ' Check whether Windows Media Center is included in your operating system
  If OSInfo.MediaCenter Then
    Log.Message "The operating system includes Windows Media Center"
    …
  End If
  …

End Sub

DelphiScript

procedure OSInfoSample();
var OSInfo;
begin
  …
  // Obtain the OSInfo object
  OSInfo := Sys.OSInfo;
  // Check whether Windows Media Center is included in your operating system
  if OSInfo.MediaCenter then
  begin
    Log.Message('The operating system includes Windows Media Center');
    …
  end;
  …

end;

C++Script, C#Script

function OSInfoSample()
{
  …
  // Obtain the OSInfo object
  var OSInfo = Sys["OSInfo"];
  // Check whether Windows Media Center is included in your operating system
  if (OSInfo["MediaCenter"])
  {
    Log["Message"]("The operating system includes Windows Media Center");
    …
  }
  …

}

See Also

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

Highlight search results