原文地址链接:
http://msdn.microsoft.com/en-us/library/aa394121(v=vs.85).aspx
测试代码:
http://blog.csdn.net/eyuanatqqdotcom/article/details/7463217
Win32_Desktop class
Applies to: desktop apps only
仅用于桌面应用程序。
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.
WMI类Win32_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
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.
快速任务切换是否被打开。
快速任务切换允许用户使用ALT+TAB组合键来快速切换窗口。
- 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
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
Minimum supported client |
Windows 2000 Professional |
---|---|
Minimum supported server |
Windows 2000 Server |
Namespace |
\root\CIMV2 |
MOF |
|
DLL |
|