; Generated by AutoIt Scriptomatic $file = FileOpen(@ScriptDir & '\LogicalDiskToPartition.log', 2) If $file <> -1 Then $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output = $Output & "Computer: " & $strComputer & @CRLF $Output = $Output & "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDiskToPartition", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $Output = $Output & "Antecedent: " & $objItem.Antecedent & @CRLF $Output = $Output & "Dependent: " & $objItem.Dependent & @CRLF $Output = $Output & "EndingAddress: " & $objItem.EndingAddress & @CRLF $Output = $Output & "StartingAddress: " & $objItem.StartingAddress & @CRLF FileWriteLine($file, $Output) FileWriteLine($file, '---------------------NewLine--------------------------------') $Output="" Next Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_LogicalDiskToPartition" ) Endif EndIf