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.
 
Back
Top