About drive letter assignments

  • Thread starter Thread starter Cato Svellingen
  • Start date Start date
C

Cato Svellingen

Hi,

I know that in registry HKLM\environment\mounteddevices\ I can alter the
drive letter assignments of mounted devices.

* My system uses Compact flash and HDD both with 2 partitions.
What i try to accomplish is that no matter if i use the same RunTime image
on new hardware, i.e. CF and HDD, the drive letters are not swapped around
due to registry not having information on the exact volume ID.


Can I alter the registry in TD, to make the assignment a little more
general?

I mean, could I make it so that certain drive letters are reserved for
certain media types ??

For example so that C:\ and D:\ is always given to devices of type compact
flash no matter which exact CF hardware I insert ?

And F:\ and G:\ is always given to HDD drives, even ..


Thanks

Cato
 
Cato,

I didn't quite understand your problem.

If you don't change the hardware much, don't change/switch IDE controllers
and don't change partition layouts and active flags on storage media, you
will get the same letter assignments if you start with empty
[HKLM\SYSTEM\MountedDevices] key.

Basically, there are rules NT/XP follows to assign default letters:
http://support.microsoft.com/default.aspx?scid=kb;en-us;93373.

In case you want to change something from the list mentioned above, you may
end up with different letters.
You can fix it with your own code (driver or app) that dismounts/mounts
volumes with letters assigned by your own rules.

KM
 
Ok,

any tip/ link to how I can dismount/mount volumes with letters assigned by
my own rules ??

thanks

Cato


KM said:
Cato,

I didn't quite understand your problem.

If you don't change the hardware much, don't change/switch IDE controllers
and don't change partition layouts and active flags on storage media, you
will get the same letter assignments if you start with empty
[HKLM\SYSTEM\MountedDevices] key.

Basically, there are rules NT/XP follows to assign default letters:
http://support.microsoft.com/default.aspx?scid=kb;en-us;93373.

In case you want to change something from the list mentioned above, you may
end up with different letters.
You can fix it with your own code (driver or app) that dismounts/mounts
volumes with letters assigned by your own rules.

KM

Hi,

I know that in registry HKLM\environment\mounteddevices\ I can alter the
drive letter assignments of mounted devices.

* My system uses Compact flash and HDD both with 2 partitions.
What i try to accomplish is that no matter if i use the same RunTime image
on new hardware, i.e. CF and HDD, the drive letters are not swapped around
due to registry not having information on the exact volume ID.


Can I alter the registry in TD, to make the assignment a little more
general?

I mean, could I make it so that certain drive letters are reserved for
certain media types ??

For example so that C:\ and D:\ is always given to devices of type compact
flash no matter which exact CF hardware I insert ?

And F:\ and G:\ is always given to HDD drives, even ..


Thanks

Cato
 
Cato,
Ok,

any tip/ link to how I can dismount/mount volumes with letters assigned by
my own rules ??

You can use FSCTL_DISMOUNT_VOLUME (search Windows DDK/MSDN documentation on
it).

By your own rules I meant your desire to assign specific letters to
particular device types.
How you do that - up to you. You can anylize disk devices in your system and
set up MountedDevices key from your code.
thanks

Cato


KM said:
Cato,

I didn't quite understand your problem.

If you don't change the hardware much, don't change/switch IDE controllers
and don't change partition layouts and active flags on storage media, you
will get the same letter assignments if you start with empty
[HKLM\SYSTEM\MountedDevices] key.

Basically, there are rules NT/XP follows to assign default letters:
http://support.microsoft.com/default.aspx?scid=kb;en-us;93373.

In case you want to change something from the list mentioned above, you may
end up with different letters.
You can fix it with your own code (driver or app) that dismounts/mounts
volumes with letters assigned by your own rules.

KM

Hi,

I know that in registry HKLM\environment\mounteddevices\ I can alter the
drive letter assignments of mounted devices.

* My system uses Compact flash and HDD both with 2 partitions.
What i try to accomplish is that no matter if i use the same RunTime image
on new hardware, i.e. CF and HDD, the drive letters are not swapped around
due to registry not having information on the exact volume ID.


Can I alter the registry in TD, to make the assignment a little more
general?

I mean, could I make it so that certain drive letters are reserved for
certain media types ??

For example so that C:\ and D:\ is always given to devices of type compact
flash no matter which exact CF hardware I insert ?

And F:\ and G:\ is always given to HDD drives, even ..


Thanks

Cato
 
Hi Cato,

Depending on the CF reader that you use, you can preassing drive letter(s) to specific reader, so no matter what CF medium you use
it will have same letters depending on reader you use.
This is true for USB CF readers, for IDE CF I don't know.

For the rest you will have to make program that will reassign volume letters trough API during the boot if change to volume letters
is detected.

Best regards,
Slobodan
 
I must admit I forgot one important thing to mention... :-(

Win32 APIs to mount disks (work with volumes, etc.) - Volume Management Functions.
E.g., SetVolumeMountPoint.

http://msdn.microsoft.com/library/en-us/fileio/base/volume_management_functions.asp

--
Regards,
KM, BSquare Corp.

Cato,
Ok,

any tip/ link to how I can dismount/mount volumes with letters assigned by
my own rules ??

You can use FSCTL_DISMOUNT_VOLUME (search Windows DDK/MSDN documentation on
it).

By your own rules I meant your desire to assign specific letters to
particular device types.
How you do that - up to you. You can anylize disk devices in your system and
set up MountedDevices key from your code.
thanks

Cato


KM said:
Cato,

I didn't quite understand your problem.

If you don't change the hardware much, don't change/switch IDE controllers
and don't change partition layouts and active flags on storage media, you
will get the same letter assignments if you start with empty
[HKLM\SYSTEM\MountedDevices] key.

Basically, there are rules NT/XP follows to assign default letters:
http://support.microsoft.com/default.aspx?scid=kb;en-us;93373.

In case you want to change something from the list mentioned above, you may
end up with different letters.
You can fix it with your own code (driver or app) that dismounts/mounts
volumes with letters assigned by your own rules.

KM


Hi,

I know that in registry HKLM\environment\mounteddevices\ I can alter the
drive letter assignments of mounted devices.

* My system uses Compact flash and HDD both with 2 partitions.
What i try to accomplish is that no matter if i use the same RunTime image
on new hardware, i.e. CF and HDD, the drive letters are not swapped around
due to registry not having information on the exact volume ID.


Can I alter the registry in TD, to make the assignment a little more
general?

I mean, could I make it so that certain drive letters are reserved for
certain media types ??

For example so that C:\ and D:\ is always given to devices of type compact
flash no matter which exact CF hardware I insert ?

And F:\ and G:\ is always given to HDD drives, even ..


Thanks

Cato
 
Back
Top