Find Driver Details in VB.NET

Below Code will Help to Find Driver Details of a System

Imports System.IO
Imports System
Imports System.Math
Public Class frmFindDriverName
Private Sub frmFindDriverName_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each objdriveinfo As DriveInfo In DriveInfo.GetDrives()
If objdriveinfo.Name = "A:\" Or objdriveinfo.Name = "G:\" Then
Else
ListBox1.Items.Add(objdriveinfo.Name & " " & Round((objdriveinfo.TotalFreeSpace / 1073741824), 2) & "GB" & " " & Round((objdriveinfo.TotalSize / 1073741824), 2) & "GB" & " " & objdriveinfo.DriveFormat & " " & objdriveinfo.VolumeLabel & "")
End If
'Label1.Text = Round(objdriveinfo.TotalFreeSpace, 2)
Next
End Sub
End Class

Output:

1 comment: