J
Jon Paal
Trying to get assembly and hard drive info
any working examples in vb available ?
I couldn;t find any examples for assembly info.
I tried this for hd info but no success.
Imports System.Management
....
Public Shared Function Volume(ByVal strDriveLetter As String) As String
If strDriveLetter = "" Or strDriveLetter Is Nothing Then
strDriveLetter = "C"
End If
Dim disk As New ManagementObject("win32_logicaldisk.deviceid=""" + strDriveLetter + ":""")
disk.Get()
Return disk("VolumeSerialNumber").ToString()
End Function 'GetVolumeSerial
error messsage is :
Compiler Error Message: BC30002: Type 'System.Management.ManagementObjectCollection' is not defined.
any working examples in vb available ?
I couldn;t find any examples for assembly info.
I tried this for hd info but no success.
Imports System.Management
....
Public Shared Function Volume(ByVal strDriveLetter As String) As String
If strDriveLetter = "" Or strDriveLetter Is Nothing Then
strDriveLetter = "C"
End If
Dim disk As New ManagementObject("win32_logicaldisk.deviceid=""" + strDriveLetter + ":""")
disk.Get()
Return disk("VolumeSerialNumber").ToString()
End Function 'GetVolumeSerial
error messsage is :
Compiler Error Message: BC30002: Type 'System.Management.ManagementObjectCollection' is not defined.