Shell.GetSetting method

Retrieves a global Shell setting.

Syntax

retVal = Shell.GetSetting(
  lSetting
)

Shell.GetSetting( _
  ByVal lSetting As long _
) As VARIANT_BOOL

Parameters

lSetting [in]

Type: long

A value that specifies the current Shell setting to retrieve. Only one setting can be retrieved in each call. The following values are recognized by this method.

SSF_AUTOCHECKSELECT (0x00800000)

Windows Vista and later. The state of the Use check boxes to select items option. This option is enabled automatically when the system has a pen input device configured.

SSF_DESKTOPHTML (0x00000200)

Not used.

SSF_DONTPRETTYPATH (0x00000800)

The state of the Allow all uppercase names option. As of Windows Vista, this folder option is no longer available.

SSF_DOUBLECLICKINWEBVIEW (0x00000080)

The state of the Double-click to open an item (single-click to select) option.

SSF_FILTER (0x00010000)

Not used.

SSF_HIDDENFILEEXTS (0x00000004)

Not used.

SSF_HIDEICONS (0x00004000)

The state of icon display in the Windows Explorer list view. If this option is active, no icons are displayed in the list view.

SSF_ICONSONLY (0x01000000)

Windows Vista and later. The state of display name display in the Windows Explorer list view. If this option is active, icons are displayed in the list view, but display names are not.

SSF_MAPNETDRVBUTTON (0x00001000)

The state of the Show map network drive button in toolbar option. As of Windows Vista, this option is no longer available.

SSF_NOCONFIRMRECYCLE (0x00008000)

The state of the Recycle Bin's Display delete confirmation dialog option.

SSF_NONETCRAWLING (0x00100000)

The state of the Automatically search for network folders and printers option. As of Windows Vista, this option is no longer available.

SSF_SEPPROCESS (0x00080000)

The state of the Launch folder windows in a separate process option.

SSF_SERVERADMINUI (0x00000004)

Not used.

SSF_SHOWALLOBJECTS (0x00000001)

The state of the Hidden files and folders option.

SSF_SHOWATTRIBCOL (0x00000100)

The state of the Show File Attributes in Detail View option. As of Windows Vista, this option is no longer available.

SSF_SHOWCOMPCOLOR (0x00000008)

The state of the Show encrypted or compressed NTFS files in color option.

SSF_SHOWEXTENSIONS (0x00000002)

The state of the Hide extensions for known file types option.

SSF_SHOWINFOTIP (0x00002000)

The state of the Show pop-up description for folder and desktop items option.

SSF_SHOWSTARTPAGE (0x00400000)

Not used.

SSF_SHOWSUPERHIDDEN (0x00040000)

The state of the Hide protected operating system files option.

SSF_SHOWSYSFILES (0x00000020)

The state of the Hidden files and folders option. In Windows Vista and later, this is equivalent to SSF_SHOWALLOBJECTS. In versions of Windows before Windows Vista, this value referred to the state of the Do not show hidden files and folders option.

SSF_SHOWTYPEOVERLAY (0x02000000)

Windows Vista and later. The state of the Display file icon on thumbnails option. If this option is active, a file type overlay is applied when a file supplies a thumbnail representation.

SSF_SORTCOLUMNS (0x00000010)

Not used.

SSF_STARTPANELON (0x00200000)

The state of the Windows XP display option, which selects between the Windows XP style and the classic style. As of Windows Vista, this option is no longer available.

SSF_WEBVIEW (0x00020000)

The state of the Display as a web view option. As of Windows Vista, this option is no longer available.

SSF_WIN95CLASSIC (0x00000400)

The state of the Classic Style option. As of Windows Vista, this option is no longer available.

Return value

JScript

Type: VARIANT_BOOL*

Set to true if the setting exists; otherwise, false.

VB

Type: VARIANT_BOOL*

Set to true if the setting exists; otherwise, false.

Examples

The following examples show the use of GetSetting for JScript, VBScript, and Visual Basic.

JScript:

<script language="JavaScript">
    function fnIShellDispatch4GetSettingJ()
    {
        var objIShellDispatch4 = new ActiveXObject("Shell.Application");
        var vReturn;
        var ssfSHOWALLOBJECTS = 1;

        vReturn = objIShellDispatch4.GetSetting(ssfSHOWALLOBJECTS);
        alert(vReturn);
    }
</script>

VBScript:

<script language="VBScript">
    function fnIShellDispatch4GetSettingVB()
        dim objIShellDispatch4
        
        set objIShellDispatch4 = CreateObject("Shell.Application")
        if (not objIShellDispatch4 is nothing) then
            dim vReturn
            dim ssfSHOWALLOBJECTS
            
            ssfSHOWALLOBJECTS = 1
            vReturn = objIShellDispatch4.GetSetting(ssfSHOWALLOBJECTS)
            alert(vReturn)
        end if
        set objIShellDispatch4 = nothing
    end function

Visual Basic:

Private Sub fnIShellDispatch4GetSetting()
    Dim objIShellDispatch4 As Shell
    
    Set objIShellDispatch4 = New Shell
    If (Not objIShellDispatch4 Is Nothing) Then
        Dim vReturn As Variant
        Dim ssfSHOWALLOBJECTS As Long
        
        ssfSHOWALLOBJECTS = 1
        vReturn = objIShellDispatch4.GetSetting(ssfSHOWALLOBJECTS)
        Debug.Print vReturn
    End If
    Set objIShellDispatch4 = Nothing
End Sub

Requirements

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