Include drives in c #

DriveInfo.GetDrives() will list all volumes mounted with a drive letter, but is there a way (without p / invoking Win32) to list raw volumes or see volumes that can be installed in a folder, not a drive letter?

+4
source share
1 answer

Yes, using WMI (Windows Management Interface)

The Win32_DiskDrive class contains information about physical hard drives, which can then be further examined to get a list of partitions.

There is also a decent tutorial on using WMI from C # and .Net

+6
source

Source: https://habr.com/ru/post/1447454/


All Articles