Is it possible to mount/unmount a physical hard drive in Windows XP?

Is it possible to mount/unmount a physical hard drive in Windows XP?

Ideally, I'd like to be able to do this from the command line so that I could have batch files to do it, ie: mount.cmd unmount.cmd

Also, if the drives can be unmounted, will they spin down?


Solution 1:

Try mountvol [drive:]path /d.

For, info type mountvol /? (just mountvol) in cmd.exe.

Solution 2:

There's a pretty good discussion courtesy of some crazy developer, a bit down and in brings you to:

Microsoft provides a utility called devcon for free download. It's a "Command Line Uility Alternative to Device Manager". It can actually do many things that I won't get into here, but removing a plug & play device is a simple operation once you know the unique name of the device you want to manipulate.

After you've downloaded devcon, run "devcon status *" in a command window. This will generate a list of all the devices on your system. Look for the line which describes your device. In my case for my external hard drive the (very cryptic) line looks like this:

SBP2\MAXTOR&ONETOUCH&LUN0\0010B9F700AFC279 That full line is a bit much but any substring that remains unique will do. I have another maxtor drive on my system but nothing else that has the phrase "sbp2\maxtor" so I'll use that. The command to safely remove my external drive then becomes:

devcon remove sbp2\maxtor* The "*" at the end is a wildcard and matches the rest of the string.