Shell.GetSystemInformation method

Retrieves system information.

Syntax


retVal = Shell.GetSystemInformation(
  sName
)

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.

sNameReturn typeDescription
DirectoryServiceAvailableBooleanSet to true if the directory service is available; otherwise, false.
DoubleClickTimeIntegerThe double-click time, in milliseconds.
ProcessorLevelIntegerWindows Vista and later. The processor level. Returns 3, 4, or 5, for x386, x486, and Pentium-level processors, respectively.
ProcessorSpeedIntegerThe processor speed, in megahertz (MHz).
ProcessorArchitectureIntegerThe processor architecture. For details, see the discussion of the wProcessorArchitecture member of the SYSTEM_INFO structure.
PhysicalMemoryInstalledIntegerThe amount of physical memory installed, in bytes.
The following are valid only on Windows XP.
IsOS_ProfessionalBooleanSet to true if the operating system is Windows XP Professional Edition; otherwise, false.
IsOS_PersonalBooleanSet to true if the operating system is Windows XP Home Edition; otherwise, false.
The following is valid only on Windows XP and later.
IsOS_DomainMemberBooleanSet 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

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)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft