Click to Rate and Give Feedback
MSDN
MSDN Library
WMI Reference
WMI Classes
Win32 Classes
 Win32_BootConfiguration Class
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

ClientRequires Windows Vista, Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0 SP4 and later.
ServerRequires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0 SP4 and later.
MOF

Declared in Cimwin32.mof.

DLLRequires Cimwin32.dll.
NamespaceDefined in \root\cimv2.

See Also

Operating System Classes


Send comments about this topic to Microsoft

Build date: 9/29/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Win32_BootConfiguration Sample using PowerShell      Thomas Lee   |   Edit   |  
# 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]:
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker