Link to home
Start Free TrialLog in
Avatar of 2newbie
2newbie

asked on

AutoIT - DriveGetDrive option for physical disks (like disk 0 - via diskpart), instead of mounted volumes (like drive c:)

Is there a method to obtain physical disks (like disk 0 - via diskpart), instead of mounted volume (like drive c:) via AutoIT?

something similar to drivegetdrive, maybe (something like what i have below, but providing disk instead of drive)?




Global $driveList, $Drive

$driveList = DriveGetDrive("fixed")
$loc = 175
$inc = 0

for $p = UBound($driveList)-1 to 1 step -1
            $Drive[$p] = GUICtrlCreateCombo("", 242, $loc + $inc, 145, 25)
            GuiCtrlSetData($Drive[$p], "|" & _ArrayToString($driveList, "|", 1))
            $inc += 25
next
$inc = 0
ASKER CERTIFIED SOLUTION
Avatar of matrixnz
matrixnz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 2newbie
2newbie

ASKER

Thanks,
             However, to clarify, I want to simply get the disk ID numbers of all physical disks, as indicated by say, diskpart, i.e. Like running diskpart - list disk - select disk 0 or select disk 1. I don't need to obtain drive letter or need to associate drive letter with disk ID.

So if there are say - 3 disks in the system, I want the user to be presented with or to select between 0, 1 or 2. If there are 2, then they are presented with 0 or 1, etc.

Sorry for the confusion.