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.

7 Responses to “Windows Volume Device Names”
  1. ewanm89 says:

    This still isn’t good enough for virtualbox as I need the path for the whole device, not just one volume.

  2. JamesD says:

    Thanks for the useful info. It’s so interesting

  3. Rajah says:

    Thanks for the wack comment JamesD.

    • ewanm89 says:

      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.

  4. Noah says:

    This is incredibly useful to me. Thank you!

  5. Sam says:

    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.

  6. ewanm89 says:

    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).

  7.  
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please leave these two fields as-is:

Protected by Invisible Defender. Showed 403 to 2 bad guys.