Shell.GetSystemInformation method

Retrieves system information.

Syntax

retVal = Shell.GetSystemInformation(
  sName
)

Shell.GetSystemInformation( _
  ByVal sName As BSTR _
) As Variant

Parameters

sName [in]

Type: BSTR

A String that specifies the system information that is being requested.

Return value

JScript

Type: Variant

Returns the value of the requested system information. The return type depends on which system information is requested. See the Remarks section for details.

VB

Type: Variant

Returns the value of the requested system information. The return type depends on which system information is requested. See the Remarks section for details.

Remarks

This method can be used to request many system information values. The following table gives the sName value that is used to request the information and the associated type of the returned value.

sName

Return type

Description

DirectoryServiceAvailable

Boolean

Set to true if the directory service is available; otherwise, false.

DoubleClickTime

Integer

The double-click time, in milliseconds.

ProcessorLevel

Integer

Windows Vista and later. The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively.

ProcessorSpeed

Integer

The processor speed, in megahertz (MHz).

ProcessorArchitecture

Integer

The processor architecture. For details, see the discussion of the wProcessorArchitecture member of the SYSTEM_INFO structure.

PhysicalMemoryInstalled

Integer

The amount of physical memory installed, in bytes.

The following are valid only on Windows XP.

IsOS_Professional

Boolean

Set to true if the operating system is Windows XP Professional Edition; otherwise, false.

IsOS_Personal

Boolean

Set to true if the operating system is Windows XP Home Edition; otherwise, false.

The following is valid only on Windows XP and later.

IsOS_DomainMember

Boolean

Set to true if the computer is a member of a domain; otherwise, false.

 

This method is not currently available in Microsoft Visual Basic.

Examples

The following examples show the use of GetSystemInformation for JScript and VBScript.

JScript:

<script language="JavaScript">
    function fnGetSystemInformationJ()
    {
        var objShell = new ActiveXObject("shell.application");
        var vReturn;

        vReturn = objShell.GetSystemInformation("ProcessorLevel");
        document.write(vReturn);
    }
</script>

VBScript:

<script language="VBScript">
    function fnGetSystemInformationVB()
        dim objShell
        dim vReturn

        set objShell = CreateObject("shell.application")

        vReturn = objShell.GetSystemInformation("ProcessorLevel")
        document.write(vReturn)

        set objShell = nothing
    end function
</script>

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Shldisp.h
IDL
Shldisp.idl
DLL
Shell32.dll (version 5.0 or later)