For those that don’t know, windows has a virtual device filesystem much like /dev on linux, however you are not able to query it directly. Part of this filesystem includes UUID like volume identifying. Windows actually uses these to assign the right drive letters to the right partitions.
Anyway, why am I droning on about all this? Well I wanted to setup VirtualBox (xVM) to directly access a flash drive a couple of months ago, now while in the documentation it told how to do it. They never mentioned how to find the volume name to do it with in the documentation. Anyway after a while trying to find out on google and not succeeding I gave up.
A couple of weeks ago I had a slight problem with some ntfs corruption, so I wiped the windows XP partition and installed Windows 7 RC x64. Next I tried to get EXT2IFS to read the linux filesystems, and while this worked fine in Vista compatibility mode (to bypass an OS check in the installer) Windows would not remember the drive letter assignments on reboot. So reading the EXT2IFS FAQ mentioned mountvol for manually getting volume UUID names and manually mounting volumes.
As this is exactly what I needed for VirtualBox and to put it in black and white for google and such.
To get Windows Volume Device Names of detectected partitions (mounted or not) one can use mountvol in cmd.
I wrote a little powershell script to mount each ext volume and put it in wondows task schedular to run automatically each system startup as the system account (only way to run something at startup with admin rights without UAC popups) and have reported the problem to the EXT2IFS developer.


Entries (RSS)
May 24th, 2009 at 12:44 pm
This still isn’t good enough for virtualbox as I need the path for the whole device, not just one volume.
June 11th, 2009 at 5:40 pm
Thanks for the useful info. It’s so interesting
June 11th, 2009 at 7:48 pm
Thanks for the wack comment JamesD.
June 11th, 2009 at 10:07 pm
In reply to post Rajah made on his blog.
The scripts are very specific, just lines like this:
mountvol H:\ “\\?\Volume{44af6184-40a4-11de-a9d8-001e8c9ac9dd}\”
Of course both drive letter and volume ID are unique to each machine.
July 22nd, 2009 at 8:31 pm
This is incredibly useful to me. Thank you!
November 4th, 2009 at 7:40 pm
I used ewan’s example to make a script (just saved the command in a .cmd file) and it worked, but I had to remove the quote marks from the command for it to work. Mountvol doesn’t want quotes I guess.
I got the volume ID with mountvol /l — for google’s sake.
November 11th, 2009 at 4:37 pm
Okay, several things.
I’m using my script with powershell so the quotes are there for the way powershell parses the syntax without the quotes it takes it as seperate various shell things given some of the parameters rather than one long string.
And just ‘mountvol’ with no arguments returns the volume IDs
Finally as I mentioned earlier, it’s not 100% usefull for virtualbox, well I’ve found the solution that diskpart can provide the correct disk number information for when wants a whole disk and not just a particular partition (or logical volume in windows case).