VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



WMI sample showing how to list desktop settings of all profiles of a (remote) computer, using WMI c

by Bart Jonkman (20 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 19th February 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

WMI sample showing how to list desktop settings of all profiles of a (remote) computer, using WMI class Win32_Desktop.

Rate WMI sample showing how to list desktop settings of all profiles of a (remote) computer, using WMI c



' This function lists desktop settings of all profiles of a (remote) computer.

' Goto http://www.activxperts.com/activmonitor and click on WMI Samples
' for more samples


Sub ListDesktop( strComputer )
    Dim objWMIService, colItems

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
Next

End Sub



' Main

Dim strComputer
Do
   strComputer = inputbox( "Please enter a computername or . for local computer", "Input" )
Loop until strComputer <> ""

ListDesktop( strComputer )

WScript.Echo( vbCrlf & "For more samples, goto http://www.activxperts.com/activmonitor and click" )
WScript.Echo( "On WMI samples" )

Download this snippet    Add to My Saved Code

WMI sample showing how to list desktop settings of all profiles of a (remote) computer, using WMI c Comments

No comments have been posted about WMI sample showing how to list desktop settings of all profiles of a (remote) computer, using WMI c. Why not be the first to post a comment about WMI sample showing how to list desktop settings of all profiles of a (remote) computer, using WMI c.

Post your comment

Subject:
Message:
0/1000 characters