- Home
·
- Internet/HTML
·
- WMI sample: retrieve boot configuration of a (remote) computer. Written in VBScript. Uses Win32_Boo
WMI sample: retrieve boot configuration of a (remote) computer. Written in VBScript. Uses Win32_Boo
WMI sample: retrieve boot configuration of a (remote) computer. Written in VBScript. Uses Win32_BootConfiguration WMI class.
Rate WMI sample: retrieve boot configuration of a (remote) computer. Written in VBScript. Uses Win32_Boo
(2(2 Vote))
' This function lists the boot configuration of a (remote) computer
' Goto http://www.activexperts.com/activmonitor and click on WMI Samples
' for more samples
Sub ListBootConfig( strComputer )
Dim objWMIService, colItems
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BootConfiguration",,48)
For Each objItem in colItems
Wscript.Echo "BootDirectory: " & objItem.BootDirectory
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "ConfigurationPath: " & objItem.ConfigurationPath
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "LastDrive: " & objItem.LastDrive
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "ScratchDirectory: " & objItem.ScratchDirectory
Wscript.Echo "SettingID: " & objItem.SettingID
Wscript.Echo "TempDirectory: " & objItem.TempDirectory
Next
End Sub
' Main
Dim strComputer
Do
strComputer = inputbox( "Please enter a computername or . for local computer", "Input" )
Loop until strComputer <> ""
ListBootConfig( strComputer )
WScript.Echo( vbCrlf & "For more samples, goto http://www.activexperts.com/activmonitor and click" )
WScript.Echo( "On WMI samples" )
WMI sample: retrieve boot configuration of a (remote) computer. Written in VBScript. Uses Win32_Boo Comments
No comments yet — be the first to post one!
Post a Comment