가장(ImpersonationLevel): http://msdn.microsoft.com/ko-kr/aa393981(en-us,VS.85).aspx
권한(Privileges): http://msdn.microsoft.com/ko-kr/aa393983(en-us,VS.85).aspx
<그림. technet.microsoft.com>
BCD WMI 클래스는 다음과 같은 클래스를 지원
http://msdn.microsoft.com/ko-kr/aa362675(en-us,VS.85).aspx
\\.\ROOT\WMI:BcdStore
\\.\ROOT\WMI:BcdObject
\\.\ROOT\WMI:BcdDeviceData
BcdDeviceData
BcdDevicePartitionData
BcdDeviceUnknownData
BcdDeviceFileData
\\.\ROOT\WMI:BcdElement
BcdBooleanElement
BcdDeviceElement
BcdIntegerElement
BcdIntegerListElement
BcdObjectElement
BcdObjectListElement
BcdStringElement
\\.\ROOT\WMI:BcdObject
\\.\ROOT\WMI:BcdDeviceData
BcdDeviceData
BcdDevicePartitionData
BcdDeviceUnknownData
BcdDeviceFileData
\\.\ROOT\WMI:BcdElement
BcdBooleanElement
BcdDeviceElement
BcdIntegerElement
BcdIntegerListElement
BcdObjectElement
BcdObjectListElement
BcdStringElement
ex, 컴퓨터에서 모든 운영체제 찾기. (TechNet)
Const BcdLibraryString_Description = &h12000004
Const WindowsImages = &h10200003
Const LegacyImages = &h10300006
strComputer = "."
Set objStoreClass = GetObject("winmgmts:{(Backup,Restore)}\\" & _
strComputer & "\root\wmi:BcdStore")
objStoreClass.OpenStore "", objStore
objStore.EnumerateObjects WindowsImages, colObjects
For Each objObject in colObjects
objObject.GetElement BcdLibraryString_Description, objElement
Wscript.Echo objElement.String
Next
Wscript.Echo
objStore.EnumerateObjects LegacyImages, colObjects
For Each objObject in colObjects
objObject.GetElement BcdLibraryString_Description, objElement
Wscript.Echo objElement.String
Next
Const WindowsImages = &h10200003
Const LegacyImages = &h10300006
strComputer = "."
Set objStoreClass = GetObject("winmgmts:{(Backup,Restore)}\\" & _
strComputer & "\root\wmi:BcdStore")
objStoreClass.OpenStore "", objStore
objStore.EnumerateObjects WindowsImages, colObjects
For Each objObject in colObjects
objObject.GetElement BcdLibraryString_Description, objElement
Wscript.Echo objElement.String
Next
Wscript.Echo
objStore.EnumerateObjects LegacyImages, colObjects
For Each objObject in colObjects
objObject.GetElement BcdLibraryString_Description, objElement
Wscript.Echo objElement.String
Next
닷넷 환경에서는 기존의 WMI 접근을 위해 지원하는 System.Management 클래스를 이용해서 접근이 가능하며, 기본(root\CIMV2) 클래스가 아니므로 ManagementScope 를 통해서 WMI 클래스 위치를 root\WMI 로 변경.
참고할만한 프로젝트. http://www.codeproject.com/KB/vista/WindowsVistaBCD.aspx
16-bcdsystemstore.gif
댓글 없음:
댓글 쓰기