Public Function GetUSB() as String
'Return a list of USB devices
'Different command for each platform
Dim My_Shell As New Shell
My_Shell.TimeOut=-1
#If TargetWindows Then
'Windows
My_Shell.Execute "cd\ & wmic path CIM_LogicalDevice where ""Description like 'USB%'"" get /value"
#Elseif TargetMacOS
'Mac
My_Shell.Execute "system_profiler SPUSBDataType"
#Elseif TargetLinux
'Linux
My_Shell.Execute "lsusb"
#Endif
dim s As String = ReplaceLineEndings(My_Shell.Result,EndOfLine)
return s
End Function
Parsing the returned string can be a bit messy, but I have some code for that somewhere, if needed.