Sub test()
'patricktoulon
Dim LiD, WmiS As Object, objdisk As Object
Set WmiS = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colDisks = WmiS.ExecQuery("SELECT * FROM Win32_LogicalDisk")
LiD = " EFGHIJKLM " 'de E à M
For Each objdisk In colDisks
If objdisk.DriveType = 2 Then 'si on veut que les disques de type clés USB
If LiD Like "*" & Left(objdisk.DeviceID, 1) & "*" Then 'si lid contient la lettre de ce lecteur
MsgBox objdisk.DeviceID
'objDisk.eject
End If
End If
Next
End Sub