How to list physical disks?
How to list physical disks in Windows? In order to obtain a list of "\\\\.\PhysicalDrive0" available. VonC WMIC wmic is a very complete tool wmic diskdrive list provide a (too much) detailed list, for instance for less info wmic diskdrive list brief C Sebastian Godelet mentions in the comments : In C: system("wmic diskdrive list"); As commented, you can also call the WinAPI, but... as shown in " How to obtain data from WMI using a C Application? ", this is quite complex (and generally done with C++, not C). PowerShell Or with PowerShell: Get-WmiObject Win32_DiskDrive One way to do it: