Mounting a volume in C#

  • Thread starter Thread starter Bry
  • Start date Start date
B

Bry

I'm trying to mount a volume using C#, and I currently have it working
using Process.Start to drive the command line utility mountvol,
however I'm wondering if there is a more elegant way of doing this.
I'm guessing it's going to require WMI, however I don't know enough
about this to even know if it is possible.

Can anyone offer any suggestions?

Many thanks.
Bry
 
Bry,

You can call the SetVolumeMountPoint API function through the P/Invoke
layer.
 

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