Professional Documents
Culture Documents
' Use WMI to get boot drive as disk and partition numbers
Set objWMIService = GetObject( "winmgmts://" & strComputer & "/root/cimv2" )
Set colItems = objWMIService.ExecQuery( "Select * From Win32_DiskPartition Where
BootPartition = true", , 48 )
For Each objItem in colItems
strBootDiskIndex = objItem.DiskIndex
strBootPartition = objItem.Index
Next
' Format the result to compare it with the result of next query
strBootDisk = "Disk #" & strBootDiskIndex & ", Partition #" & strBootPartition