Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

OSPlatform Property

Location

My.Computer.Info.OSPlatform

Syntax

Dim result As String = My.Computer.Info.OSPlatform

Description

The OSPlatform property returns the basic platform name of the operating system.

Usage at a Glance

  • This property is read-only.

  • An exception is thrown if the user does not have sufficient security privileges to access system information.

  • If Windows Management Instrumentation (WMI) is installed on the local computer, the My.Computer.Info.OSFullName property will provide much more detailed information than this property.

Example

The text returned by this property varies by operating system. For instance, the text returned for Windows XP Professional is "Win32NT."

Related Framework Entries

  • Microsoft.VisualBasic.Devices.ComputerInfo.OSPlatform Property

  • System.Environment.OSVersion Property

  • System.OperatingSystem.Platform Property

See Also

Info Object (My.Computer), OSFullName Property, OSVersion Property

Категории