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 information about the OS Boot Configuration using Win32_BootConfiguration 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_BootConfiguration.txt", ForAppending, True)
TextFile.WriteLine "Script for Win32_BootConfiguration Class by Karthikeyan"
TextFile.WriteLine
Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
Set Items = WMIService.ExecQuery("Select * from Win32_BootConfiguration",,48)
For Each SubItems in Items
TextFile.WriteLine "********************************************************************"
TextFile.WriteLine "BootDirectory: " & SubItems.BootDirectory
TextFile.WriteLine "Caption: " & SubItems.Caption
TextFile.WriteLine "ConfigurationPath: " & SubItems.ConfigurationPath
TextFile.WriteLine "Description: " & SubItems.Description
TextFile.WriteLine "LastDrive: " & SubItems.LastDrive
TextFile.WriteLine "Name: " & SubItems.Name
TextFile.WriteLine "ScratchDirectory: " & SubItems.ScratchDirectory
TextFile.WriteLine "SettingID: " & SubItems.SettingID
TextFile.WriteLine "TempDirectory: " & SubItems.TempDirectory
TextFile.WriteLine "********************************************************************"
Next
TextFile.Close
OutFile.Run "notepad.exe c:\Win32_BootConfiguration.txt",1,True
No comments have been posted about Get the information about the OS Boot Configuration using Win32_BootConfiguration WMI Class. Why not be the first to post a comment about Get the information about the OS Boot Configuration using Win32_BootConfiguration WMI Class.