Get drive label in C#

前端 未结 8 1996
臣服心动
臣服心动 2020-12-20 12:20

When I use System.IO.DriveInfo.GetDrives() and look at the .VolumeLabel property of one of the drives, I see \"PATRIOT XT\", which is indeed the dr

相关标签:
8条回答
  • 2020-12-20 12:55

    Looks like My Computer looks at the autorun.inf and uses the label= value from the [autorun] section.

    Still not quite sure where the "DVD RW Drive" and "Floppy Disk Drive" labels come from, but I guess they may be hardcoded based on the drive type.

    0 讨论(0)
  • 2020-12-20 12:58

    This looks like it could be a solution.

    0 讨论(0)
提交回复
热议问题