drive letter vs. active partition

  • Thread starter Thread starter Johnny Van Bavegem
  • Start date Start date
J

Johnny Van Bavegem

I am looking for some code to know what drive letter has been assigned to the
active boot partition. I tried this using WMI but not all parts of WMI are in
my XPe image, and I do not know what components I am missing.
So some (example) code would be nice.

Johnny
 
diskpart is a part of file system component in xpe. If you have file system
component, then you can run diskpart from command prompt to find out the
drive letter assignment.
 
Johnny,

You haven't mentioned the language you are looking for the code written in.

Basically what you are looking for is enumerating volume mount points in the system. There is so much available on the subject that
it is really easy to search the Web for it. For instance, MSDN has a few code samples. Here is one of them:
http://msdn2.microsoft.com/en-us/library/aa364037(VS.85).aspx (check out the parent node and you;ll find more samples there).

On CodeGuru or CodeProject you will find a bunch of sample apps and useful wrapper classes on the subject. Here is one:
http://www.codeproject.com/KB/static/driveinfo.aspx

Or you can simply get all this info from [HKLM\System\MountDevices] registry key.
 
Thanks KM,

I will use the informatiion from the registry key. As far as I can see now I
can find every information I need in this key.

Johnny

KM said:
Johnny,

You haven't mentioned the language you are looking for the code written in.

Basically what you are looking for is enumerating volume mount points in the system. There is so much available on the subject that
it is really easy to search the Web for it. For instance, MSDN has a few code samples. Here is one of them:
http://msdn2.microsoft.com/en-us/library/aa364037(VS.85).aspx (check out the parent node and you;ll find more samples there).

On CodeGuru or CodeProject you will find a bunch of sample apps and useful wrapper classes on the subject. Here is one:
http://www.codeproject.com/KB/static/driveinfo.aspx

Or you can simply get all this info from [HKLM\System\MountDevices] registry key.

--
=========
Regards,
KM
I am looking for some code to know what drive letter has been assigned to the
active boot partition. I tried this using WMI but not all parts of WMI are in
my XPe image, and I do not know what components I am missing.
So some (example) code would be nice.

Johnny
 
Back
Top