Controling drive mapping

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

I need to be able to control drive mapping on a win2000 server with C#. I
will need to be able to check for it's existence (think I figured this out)
and most importantly create a mapping to a server when necessary.

Thanks for any clues you can give me on where to start looking.
 
Tim,

You can easily check for mappings by using the classes in the
System.Management namespace to check for the existence of any instances of
the WMI class Win32_MappedLogicalDisk. In order to add new drive mappings,
you can call the WNetAddConnection functions in the API through the P/Invoke
layer.

Hope this helps.
 
Back
Top