by Karthikeyan (187 Submissions)
Category: Miscellaneous
Compatability: VB Script
Difficulty: Unknown Difficulty
Originally Published: Thu 29th July 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get the Desktop information for all accounts using Win32_Desktop WMI Class
'Generated using 'WMI Win32 Class Autoscript Generator' - Developed by Karthikeyan
'Homepage: http://www.geocities.com/marskarthik
On Error Resume Next
Computer = "."
Set OutFile = CreateObject("WScript.Shell")
Const ForAppending = 2
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set TextFile = FileSystem.OpenTextFile ("c:\Win32_Desktop.txt", ForAppending, True)
TextFile.WriteLine "Script for Win32_Desktop Class by Karthikeyan"
TextFile.WriteLine
Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_Desktop",,48)
For Each SubItems in Items
TextFile.WriteLine "********************************************************************"
TextFile.WriteLine "BorderWidth: " & SubItems.BorderWidth
TextFile.WriteLine "Caption: " & SubItems.Caption
TextFile.WriteLine "CoolSwitch: " & SubItems.CoolSwitch
TextFile.WriteLine "CursorBlinkRate: " & SubItems.CursorBlinkRate
TextFile.WriteLine "Description: " & SubItems.Description
TextFile.WriteLine "DragFullWindows: " & SubItems.DragFullWindows
TextFile.WriteLine "GridGranularity: " & SubItems.GridGranularity
TextFile.WriteLine "IconSpacing: " & SubItems.IconSpacing
TextFile.WriteLine "IconTitleFaceName: " & SubItems.IconTitleFaceName
TextFile.WriteLine "IconTitleSize: " & SubItems.IconTitleSize
TextFile.WriteLine "IconTitleWrap: " & SubItems.IconTitleWrap
TextFile.WriteLine "Name: " & SubItems.Name
TextFile.WriteLine "Pattern: " & SubItems.Pattern
TextFile.WriteLine "ScreenSaverActive: " & SubItems.ScreenSaverActive
TextFile.WriteLine "ScreenSaverExecutable: " & SubItems.ScreenSaverExecutable
TextFile.WriteLine "ScreenSaverSecure: " & SubItems.ScreenSaverSecure
TextFile.WriteLine "ScreenSaverTimeout: " & SubItems.ScreenSaverTimeout
TextFile.WriteLine "SettingID: " & SubItems.SettingID
TextFile.WriteLine "Wallpaper: " & SubItems.Wallpaper
TextFile.WriteLine "WallpaperStretched: " & SubItems.WallpaperStretched
TextFile.WriteLine "WallpaperTiled: " & SubItems.WallpaperTiled
TextFile.WriteLine "********************************************************************"
Next
TextFile.Close
OutFile.Run "notepad.exe c:\Win32_Desktop.txt",1,True
No comments have been posted about Get the Desktop information for all accounts using Win32_Desktop WMI Class. Why not be the first to post a comment about Get the Desktop information for all accounts using Win32_Desktop WMI Class.