drive letter vs. active partition

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
 
R

Rajib Ghosal

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

KM

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

Johnny Van Bavegem

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
 

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

Top