How to Mount/Unmount Drives on Windows?

D

dpickles

Hello,

I am creating a simple application that will reside in the Windows
system tray. The purpose of the program is to mount or unmount external
hard drives or flash memory devices, and to set their default states
(ie mounted or unmounted) at startup.

I do not know how to mount or unmount drives on Windows. I think that
it could possibly be done with a DOS command (using os.system()).

Thank you for any information you may have.
 
C

Christos Georgiou


I do not know how to mount or unmount drives on Windows. I think that
it could possibly be done with a DOS command (using os.system()).

mountvol is the command you want. I know it's in winxp, I think it was in
win2k too.

Check the Windows Help for its usage.

PS another command that is most useful is netsh, especially for laptops.
 
D

dpickles

thank you!
devcon was a little more than I needed, and I couldn't get it to work
for how I wanted to use it. I will try mountvol. If it has an argument
to unmount a volume as well, then it will fit the bill perfectly.
 

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

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top