Operation with devices

  • Thread starter Thread starter JenCarlos
  • Start date Start date
J

JenCarlos

Guest
Good…
Firstly, I tell you.
The following code allows me to list as:

Dim SH As New Shell32.Shell

Dim drives As Shell32.Folder = SH.NameSpace(Shell32.ShellSpecialFolderConstants.ssfDRIVES)

For Each Item As Shell32.FolderItem In drives.Items
MsgBox(Item.Name)
Next Item


1.- Local units, C, D
2.- DVD / CD reading units
3.- The pendrives, portable (USB) connected to Windows
4.- Mobile devices (Android) connected to Windows
And others…

Now, the operation I want to perform is:
Block, that is, not shown in the list
1.- Local units, C, D
2.- DVD / CD reading units

And the last two I would like to show
3.- The pendrives, portable (USB) connected to Windows
4.- Mobile devices (Android) connected to Windows

Try to solve this problem with this condition

If Item.IsFileSystem = False Then
MsgBox(Item.Name)
End If


But it just showed me, the connected mobile devices and not the pendrives.

I hope you can help me with this.

thanks

Continue reading...
 
Back
Top