Export (0) Print
Expand All

Win32_Desktop class

The Win32_Desktop WMI class represents the common characteristics of a user's desktop. The properties of this class can be modified by the user to customize the desktop.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order, not MOF order.

Syntax

[Provider("CIMWin32")]class Win32_Desktop : CIM_Setting
{
  uint32  BorderWidth;
  string  Caption;
  boolean CoolSwitch;
  uint32  CursorBlinkRate;
  string  Description;
  boolean DragFullWindows;
  uint32  GridGranularity;
  uint32  IconSpacing;
  string  IconTitleFaceName;
  uint32  IconTitleSize;
  boolean IconTitleWrap;
  string  Name;
  string  Pattern;
  boolean ScreenSaverActive;
  string  ScreenSaverExecutable;
  boolean ScreenSaverSecure;
  uint32  ScreenSaverTimeout;
  string  SettingID;
  string  Wallpaper;
  boolean WallpaperStretched;
  boolean WallpaperTiled;
};

Members

The Win32_Desktop class has these types of members:

Properties

The Win32_Desktop class has these properties.

BorderWidth
Data type: uint32
Access type: Read-only

Width of the borders around all windows with adjustable borders.

Example: 3

Caption
Data type: string
Access type: Read-only

Short description of the CIM_Setting object.

CoolSwitch
Data type: boolean
Access type: Read-only

Fast task switching is turned on. Fast task switching allows the user to switch between windows using the ALT+TAB keyboard combination.

CursorBlinkRate
Data type: uint32
Access type: Read-only
Qualifiers: Units (Milliseconds)

Length of time between successive cursor blinks.

Example: 530

Description
Data type: string
Access type: Read-only

Description of the CIM_Setting object.

DragFullWindows
Data type: boolean
Access type: Read-only

Contents of a window are shown when a user moves the window.

GridGranularity
Data type: uint32
Access type: Read-only
Qualifiers: Units (8 Pixels)

Spacing of the grid that windows are bound to on the desktop. This makes organizing windows easier. The spacing is usually fine enough that the user does not notice it.

Example: 1

IconSpacing
Data type: uint32
Access type: Read-only
Qualifiers: Units (Pixels)

Spacing between icons.

Example: 75

IconTitleFaceName
Data type: string
Access type: Read-only

Font used for the names of the icons.

Example: "MS San Serif"

IconTitleSize
Data type: uint32
Access type: Read-only
Qualifiers: Units (Point)

Icon font size.

Example: 9

IconTitleWrap
Data type: boolean
Access type: Read-only

Icon's title text wraps to the next line.

Name
Data type: string
Access type: Read-only
Qualifiers: Key

Name that identifies the current desktop profile.

Example: "MainProf"

Pattern
Data type: string
Access type: Read-only

Name of the pattern used as the background for the desktop.

ScreenSaverActive
Data type: boolean
Access type: Read-only

Screen saver is active.

ScreenSaverExecutable
Data type: string
Access type: Read-only

Name of the current screen saver executable file.

Example: "LOGON.SCR"

ScreenSaverSecure
Data type: boolean
Access type: Read-only

Password is enabled for the screen saver.

ScreenSaverTimeout
Data type: uint32
Access type: Read-only
Qualifiers: Units (Seconds)

Amount of time that passes before the screen saver starts.

SettingID
Data type: string
Access type: Read-only

Identifier by which the CIM_Setting object is known.

Wallpaper
Data type: string
Access type: Read-only

File name for the wallpaper design on the background of the desktop.

Example: "WINNT.BMP"

WallpaperStretched
Data type: boolean
Access type: Read-only

Wallpaper is stretched to fill the entire screen. Microsoft Plus! must be installed before this option is available. If FALSE, the wallpaper retains its original dimensions on the desktop background.

WallpaperTiled
Data type: boolean
Access type: Read-only

Wallpaper is tiled or centered.

Remarks

The Win32_Desktop class is derived from CIM_Setting.

The calling process that uses this class must have the SE_RESTORE_NAME privilege on the computer in which the registry resides. For example, if you enumerate this class on the local computer, the account under which your application runs must have this privilege. For more information, see Executing Privileged Operations.

Examples

The following code sample describes how to retrieve desktop information.



$desktops = Get-WmiObject win32_desktop

"This system has {0} desktop objects" -f $desktops.length
Foreach ($dt in $desktops) {
"Desktop {0}" -f $i++
"  BorderWidth           : {0}" -f $dt.BorderWidth 
"  Caption               : {0}" -f $dt.Caption
"  CoolSwitch            : {0}" -f $dt.CoolSwitch
"  CursorBlinkRate       : {0}" -f $dt.CursorBlinkRate
"  Description           : {0}" -f $dt.Description 
"  DragFullWindows       : {0}" -f $dt.DragFullWindows
"  GridGranularity       : {0}" -f $dt.GridGranularity 
"  IconSpacing           : {0}" -f $dt.IconSpacing
"  IconTitleFaceName     : {0}" -f $dt.IconTitleFaceName
"  IconTitleSize         : {0}" -f $dt.IconTitleSize
"  IconTitleWrap         : {0}" -f $dt.conTitleWrap
"  Name                  : {0}" -f $dt.Name
"  Pattern               : {0}" -f $dt.Pattern 
"  ScreenSaverActive     : {0}" -f $dt.ScreenSaverActive
"  ScreenSaverExecutable : {0}" -f $dt.ScreenSaverExecutable
"  ScreenSaverSecure     : {0}" -f $dt.creenSaverSecure
"  ScreenSaverTimeout    : {0}" -f $dt.ScreenSaverTimeout
"  SettingID             : {0}" -f $dt.SettingID
"  Wallpaper             : {0}" -f $dt.Wallpaper
"  WallpaperStretched    : {0}" -f $dt.WallpaperStretched
"  WallpaperTiled        : {0}" -f $dt.WallpaperTiled
""
}


Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

MOF

CIMWin32.mof

DLL

CIMWin32.dll

See also

Operating System Classes

 

 

Show:
© 2014 Microsoft