Win32_Desktop - WMI sample in VBScript

The foundations for Manageability in Windows 7/2008/Vista/XP/2000 and Millennium Edition/'98 are Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself.

On this site, you can find many WMI samples.

The Win32_Desktop WMI class can be used in ActiveXperts Network Monitor to monitor your servers.



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.


On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Desktop",,48)
For Each objItem in colItems
    Wscript.Echo "BorderWidth: " & objItem.BorderWidth
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "CoolSwitch: " & objItem.CoolSwitch
    Wscript.Echo "CursorBlinkRate: " & objItem.CursorBlinkRate
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "DragFullWindows: " & objItem.DragFullWindows
    Wscript.Echo "GridGranularity: " & objItem.GridGranularity
    Wscript.Echo "IconSpacing: " & objItem.IconSpacing
    Wscript.Echo "IconTitleFaceName: " & objItem.IconTitleFaceName
    Wscript.Echo "IconTitleSize: " & objItem.IconTitleSize
    Wscript.Echo "IconTitleWrap: " & objItem.IconTitleWrap
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Pattern: " & objItem.Pattern
    Wscript.Echo "ScreenSaverActive: " & objItem.ScreenSaverActive
    Wscript.Echo "ScreenSaverExecutable: " & objItem.ScreenSaverExecutable
    Wscript.Echo "ScreenSaverSecure: " & objItem.ScreenSaverSecure
    Wscript.Echo "ScreenSaverTimeout: " & objItem.ScreenSaverTimeout
    Wscript.Echo "SettingID: " & objItem.SettingID
    Wscript.Echo "Wallpaper: " & objItem.Wallpaper
    Wscript.Echo "WallpaperStretched: " & objItem.WallpaperStretched
    Wscript.Echo "WallpaperTiled: " & objItem.WallpaperTiled