Win32 Classes


Win32_BootConfiguration Class

The Win32_BootConfiguration WMI class represents the boot configuration of a computer system running Windows.

The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties are listed in alphabetic order, not MOF order.

Syntax

class Win32_BootConfiguration : CIM_Setting
{
  string BootDirectory;
  string Caption;
  string ConfigurationPath;
  string Description;
  string LastDrive;
  string Name;
  string ScratchDirectory;
  string SettingID;
  string TempDirectory;
};

Methods

The Win32_BootConfiguration class does not define any methods.

Properties

The Win32_BootConfiguration class defines the following properties.

BootDirectory
Data type: string
Access type: Read-only

Path to the system files required for booting the system.

Example: "C:\Windows"

Caption
Data type: string
Access type: Read-only
Qualifiers: MaxLen(64)

Short description (one-line string) of the CIM_Setting object. This property is inherited from CIM_Setting.

ConfigurationPath
Data type: string
Access type: Read-only

Path to the configuration files. This value may be similar to the value in the BootDirectory property.

Description
Data type: string
Access type: Read-only

Description of the CIM_Setting object. This property is inherited from CIM_Setting.

LastDrive
Data type: string
Access type: Read-only

Last drive letter to which a physical drive is assigned.

Example: "E:"

Name
Data type: string
Access type: Read-only
Qualifiers: Key, MaxLen(256)

Name of the boot configuration. It is an identifier for the boot configuration.

ScratchDirectory
Data type: string
Access type: Read-only

Directory where temporary files can reside during boot time.

SettingID
Data type: string
Access type: Read-only
Qualifiers: MaxLen(256)

Identifier by which the CIM_Setting object is known. This property is inherited from CIM_Setting.

TempDirectory
Data type: string
Access type: Read-only

Directory where temporary files are stored.

Example: "C:\TEMP"

Remarks

The Win32_BootConfiguration class is derived from CIM_Setting.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
MOFCimwin32.mof
DLLCimwin32.dll
Namespace\root\cimv2

See Also

Operating System Classes

Send comments about this topic to Microsoft

Build date: 11/3/2009

Tags :


Community Content

Thomas Lee
Win32_BootConfiguration Sample using PowerShell
# wmi-getbootconfiguration.ps1
# demonstrates the use of the Win32_BootConfiguration WMI class
# Thomas Lee - tfl@psp.co.uk
  
# Get Boot configuration from WMI
$boot = Get-WMIObject Win32_BootConfiguration
 
# Display information
"Boot Directory     : {0}" -f $boot.bootdirectory
"Caption : {0}" -f $boot.caption
"Description : {0}" -f $boot.description
"Last Drive : {0}" -f $boot.lastdrive
"Scratch Directory : {0}" -f $boot.scratchdirectory
"Temp Directory : {0}" -f $boot.tempdirectory

This script produces the following output on an XP system:

PSH [D:\foo\wmi]: .\wmi-getbootconfiguration.ps1
Boot Directory : \WINDOWS
Caption : \Device\Harddisk0\Partition1
Description : \Device\Harddisk0\Partition1
Last Drive : K:
Scratch Directory : C:\WINDOWS\system32\config\systemprofile\Local Settings\Temp
Temp Directory : C:\WINDOWS\system32\config\systemprofile\Local Settings\Temp
PSH [D:\foo\wmi]:

Page view tracker