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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top