Public Function GetDiskSerial() As String Dim WMI As Object Dim wmiCollection As Object Dim wmiMember As Object 'Get the WMI Object Set WMI = GetObject("winmgmts:\\") 'Get a collection of drives Set wmiCollection = WMI.InstancesOf("Win32_PhysicalMedia") For Each wmiMember In wmiCollection GetDiskSerial = Trim(wmiMember.SerialNumber) Exit For Next Set wmiMember = Nothing Set wmiCollection = Nothing Set WMI = Nothing End Function
|Runtime error 76: path not found error VB6 program on Windows 7||3||325|
|Controlling which port to download from||4||71|
|Write data from SQL to CSV file - position||1||52|
|How to set the row selection as it was prior leaving the datagrid in vb6||3||34|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
24 Experts available now in Live!