in reply to Is a drive USB, IDE or SCSI?

See msdn for where to get the info (on newer versions), and see Win32::Process::Info (WMI.pm) for examples of how to get at it from perl.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Is a drive USB, IDE or SCSI?
by slloyd (Hermit) on Dec 02, 2005 at 17:32 UTC
    I have tried WMI using the Win32_DiskDrive class but this tells partition information. It does return InterfaceType but how do I map a particular drive letter to a partiton? I spent several hours on it last night but could not get it to work.

    -------------------------------
    by me
    http://www.basgetti.com
    http://www.kidlins.com

      You will probably need to query information from one of the other WMI classes to make the connection between drive letters, logical partitions and physical drives. OS classes page gives a list of them.

      Of particular interest to you will be Win32_DiskDriveToDiskPartition, Win32_LogicalDisk, Win32_LogicalDiskToPartition amongst others.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.