vb.net how to check if a network drive is mapped persistently -


I use the following code to layout the network drive on a system. I want to add a third column for perseverance, but in vb.net I do not know if there is a continuous map of the drive or not. any suggestion?

  DriveInfo.GetDrives in DriveInfo for each Drive_info () if drive_info.DriveType (). ToString = "network" then with map ITEM Add (drive_info.Name) .SubItems (Drive_Info.driv type). Toasting) ends with the end if the next drive_info  

You always get in WMI without any (Well just fine) could do this without the dirty eyes.

Example

 Import System Import System. Management Public Module Modem sub-main () Finder New Management Object Search ("SELECT * FROM Win32_NetworkConnection WHERE LocalName = 'Z:'") Dimmer as a management object for each obj in the explorer. Get Console.WriteLine ("{0} {1}", obj.Item ("LocalName"). ToString, Obj.Item ("continuous")) The next end sub-end module 

The system can add context to Mnation.dll and Z: to check the change, or you can possibly replace all your code with just that snippet because all the mapped drives will be returned by removing the WHERE clause.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -