Aș prefera să nu recurg la apelarea liniei de comandă Căut un cod care să poată mapa/deconecta o unitate, deși are de asemenea o abordare a excepțiilor.
Vreo idee?
Here is an article for using a class for interfacing to the "map network drive" windows interface: C# Map Network Drive (API)
Use P/Invoke and WNetAddConnection2 There should also be some wrappers out there to do some of the grunt work for you. Google is your friend, as always.