Share via


System Object

SharePoint Designer Developer Reference

Provides access to system information such as the operating system, screen resolution, or registry.

Remarks

Use the System property to return the System object. The following statement returns the name of the calling application.

Visual Basic for Applications
mySysApp = System.Application.Name

Use the Build and Version properties to return build and version information about the operating system.

Visual Basic for Applications
myVer = System.Version
myBld = System.Build

The horizontal and vertical resolution can be used to determine whether a graphic can be displayed on a particular computer. The following statements return the resolution settings.

Visual Basic for Applications
currHorizRes = System.HorizontalResolution
currVertRes = System.Vertical.Resolution

Use the OperatingSystem property to return the name of the current operating system, as shown in the following statement.

Visual Basic for Applications
thisOps = System.OperatingSystem

Use the Parent property to return the parent of the specified object. The following statement returns parent information for the System object.

Visual Basic for Applications
Private Sub GetSystemParentInfo()
    Dim mySys As System
    Dim mySysUserName As String
    Set mySys = System
    With mySys
        mySysUserName =.Parent.UserName
    End With
End Sub

Use the LanguageDesignation property to return a three-letter abbreviation for the language used for the operating system. The following statement returns "enu" as the language designation abbreviation for the English (US) language.

Visual Basic for Applications
currSystemLanguage = System.LanguageDesignation

Use the ProfileString property to return or set an entry in the Windows registry. If used without parameters, the ProfileString property defaults to the following key:

HKEY_CURRENT_USERS\Software\Microsoft\FrontPage

The parameters for the ProfileString property are as follows:

  • RegistrySection, a registry subtree such as HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE.
  • RegistryKey, the next level below the section or subtree with such key names as Software or Network.

The following example returns the Identifier for the CentralProcessor subkey.

Visual Basic for Applications
Private Sub GetProfileString()
    Dim mySys As System
    Dim myRegSec As String
    Dim myRegKeyInfo As String
    Set mySys = System
    myRegSec = _
     "HKEY_LOCAL_MACHINE\Hardware\Description\System\CentralProcessor\0"
    myRegKeyInfo  = mySys.ProfileString(myRegSec, "Identifier")
End Sub

See Also