473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Mounting a volume in C#

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

Jul 21 '07 #1
1 3190
Bry,

You can call the SetVolumeMountPoint API function through the P/Invoke
layer.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Bry" <br*********@gmail.comwrote in message
news:11**********************@m3g2000hsh.googlegro ups.com...
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
Jul 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rafa | last post by:
Hi I'm just learning C and I was trying to do an exercise in a book which asks me to write a program to calculate the volume of a sphere. I know the formula is Volume = (4/3)*(Pi)*(Radius)^3 and...
8
by: Dmitry Klymenko | last post by:
Do exists a way to detect a volume label of a disk? I've found the way to do this using WMI (System.Management) or winapi function. The second solution is principal non-portable in future, the first...
0
by: geoffrey.slinker | last post by:
I have developed a new type of chart. It shows the relative volume for each price during an interval. http://home.att.net/~geoffrey.slinker/maverick/VolumeBars.html I am a Data Visualization...
2
by: Bob Day | last post by:
Using VS 2003, VB. Net, MSDE... Usining task sheduler, I wish to mute the volume in the .bat file that task scheduler runs (windows XP Pro). I don't see anyway to do this via a .bat line...
16
by: Basil Fawlty | last post by:
Hi everyone, I have an assignment, to create a simple VB program that computes the volume of a cylinder. The Form is pretty simple, it has a label and text box for base radius, another for height...
7
by: Rich Milburn [MVP] | last post by:
Ok I am not a programmer, I copied some code and very painfully got it working in VB6. I can adjust the volume with waveOutSetVolume on winmm.dll. But I could not seem to be able to figure out how...
0
by: techspirit | last post by:
Hello , I am looking for help in controlling the volume of a media file in a vb.net application. The code that I currently have (attached below) tries to control the master volume which finally...
4
by: Luc The Perverse | last post by:
Hi - I have very little C# programming experience. I am making a software product which calls for an interface almost identical to Windows Explorer - and I wondered if mounting a "virtual drive"...
2
by: sajithamol | last post by:
What is mounting and its use? How to mount a drive to the drive in win XP?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.