Solved

*Easy*way to change removable drive letters?

Posted on 2006-07-18
36
472 Views
Last Modified: 2007-12-19
Regarding the problem whereby Windows XP doesn't bother checking network drive letter usage when assigning letters to removable drives, I've been looking for an automated or easy way to change that drive letter as unfortunately our 1000 or so PCs use F: for a network drive.

Obviously this can be changed in Disk Management locally or remotely by our support guys on a case by case basis, but what I want is an easy, foolproof, method Ordinary Joe can use.

The sort of thing I've in mind but haven't got to work would be a script to detect removable drives, and identify any that have no drive letter or the same letter as a network drive, and assign a new letter where appropriate. Basically do what Windows should be doing in the first place.

It strikes me someone must have tried this already...
0
Comment
Question by:B-M-C
  • 7
  • 6
  • 6
  • +6
36 Comments
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 17133585
I don't understand what you mean that it doesn't bother checking network drive letter usage.  It should not assign a drive letter that is MAPPED already.  

Jef
TechSoEasy
0
 
LVL 9

Accepted Solution

by:
Krompton earned 168 total points
ID: 17133616
B-M-C

This is just a thought and I’m not sure it would work but…
If you just want to prevent new devices from using the drive letter F then pick a typical system insert a USB drive device that is unlikely to be used by your users (Like a USB Floppy – Not many folks carry one of those around) then change the value “\DosDevices\?:” added in “HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\” to “\DosDevices\F:”. As long as no one inserts that USB Floppy device (should have a unique serial number) the machine will reserve the letter F for this device. This would not affect the mapped drive for the user since that’s in HKCU but should prevent that letter being given to any new device connected. If you then export “HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\” to a .reg file and remove all but the "\\DosDevices\\F:"=hex:blah,blah,blah” entry you should be able to merge it into all the machines.

There is also a utility I read about here: http://www.uwe-sieber.de/usbdlm_e.html
Though I haven't used it myself it sounds like it may also work for you. It would require a license, but pricing is not bad.

Krompton
0
 
LVL 9

Expert Comment

by:Krompton
ID: 17133657
Jef,

Just Gotta love M$, eh?

For some reason Windows 2K/XP only check HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices for assigned drive letters. Mapped drives are stored in HKCU\Network (and only if it is a persistant mapping) which is why BMC (and others I'm sure) run into problems.

Cheers,
Krompton
0
 
LVL 15

Assisted Solution

by:Ryan_R
Ryan_R earned 166 total points
ID: 17134859
simple and easy:

in win 2000/xp, r/click My Computer and click Manage...
on the bottom left click/expand Drive Management
r/click your drive letter you want to change on the right (either from top list or bottom list, whichever works)
click Change Drive letter and choose a new drive letter from the list. Click OK....

let me know if you have any probs following this
Ryan R
0
 
LVL 1

Expert Comment

by:JexPam
ID: 17134860
This is a challenge. If I read right, you want to reserve certain drive letters for network mappings and not let removable storage devices consume the letters.

This gets even trickier based on the device. Some removable storage devices, such as Kodak cameras, grab the next Physical drive letter (mounted drives) and will override a mapped drive letter already in use.
For example
Drive C = Hard drive
Drive D = CD-Rom
Drive E = Network Mapping
Then you plug in the device and it takes the next available mounted drive letter (E:) even though its already used as a network mapping.

So that’s one issue to consider. You may need to adjust you map drive letter range lower down the alphabet starting at H: (or even lower).

That said, I do not know of a way off the top of my head to “reserve” drive letters from removable media.
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 17135829
if you do what i posted at the same time as what you posted it should fix it. ie I can use this method to reserve B: or X: or what-ever drive for my removable USB disk (thumb drive)
in theory it should work with CF cards as well
Ryan R
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 17135881
"what I want is an easy, foolproof, method Ordinary Joe can use"

There is nothing ordinary Joe can understand, let alone use.  Windows DYNAMICALLY assigns drive letter as it finds them, that all started with USB, and if you cripple this function in XP, it cannot assign drive letters to removable devices.

If you use the command NET USE F:\thisNWdrive early enough in the boot sequence, it will realize that F is a reserved drive.  As others above have said, look at the registry keys to see what the drive list is, then devise a .REG file to add the NET USE with parameters to reserve F for the network drive.  WE cannot give you a "Joe-level" solution, because it totally depends on what drive letters are already assigned in Joes standard registry setup.  But having inspected that, you can figure out how to add the NET USE command to accomplish this, then add it to everyones registry.
0
 
LVL 7

Expert Comment

by:nttranbao
ID: 17136048
Just do like ryan-R has suggested.
that's my recommendation
0
 
LVL 5

Author Comment

by:B-M-C
ID: 17136758
Very nice idea Krompton, unfortunately doen't work. These keys store which device was last assigned each letter. When a device is inserted, if it is known it is given that letter again (if not currently in use by fixed or removable disks. Windows doesn't use them as anysort of exclusion list - it will still happily dish out those letters to new devices. There may be some mileage in the utility you mention though.

Those suggesting to use disk management, please reread the question.

The network drive letter mappings were chosen long before USB removable drives existed, there's no way we can change it now with the number of users involved
0
 
LVL 9

Expert Comment

by:Krompton
ID: 17137702
B-M-C

True. If you examine the data in each binary value in the you will see things like "\??\USBSTOR#SFloppy&...." for a USB Floppy and "\??\STORAGE#RemovableMedia#...."  for thumb drive type devices (Removable Media). XP will not quote/unquote reserve a drive letter but it does hand them out by "Type" as each device is connected. Each Value in this key also stores the serial number of the device that was connected. XP will check the values in mounteddevices key for a value containing the same serial number. When the same device is later connected to the same machine XP will assign it the same drive letter so long as a Physical drive has not been given that letter such as adding a HDD or CD-ROM or another device of the same type was used. If another Removable Media device was connected the Data will be overwritten. But if the device type is different XP will move on to another letter. That's why I suggested using a USB floppy since those are not very common. I just tested this on my machine and it seems to work as I thought (try putting information below in a reg file and see what you get). This is the only idea I have at the moment other than the link I suggested in my first post.

Good luck,
Krompton



Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices]
"\\DosDevices\\F:"=hex:5c,00,3f,00,3f,00,5c,00,55,00,53,00,42,00,53,00,54,00,\
  4f,00,52,00,23,00,53,00,46,00,6c,00,6f,00,70,00,70,00,79,00,26,00,56,00,65,\
  00,6e,00,5f,00,4e,00,45,00,43,00,26,00,50,00,72,00,6f,00,64,00,5f,00,55,00,\
  53,00,42,00,5f,00,55,00,46,00,30,00,30,00,30,00,78,00,26,00,52,00,65,00,76,\
  00,5f,00,31,00,2e,00,35,00,30,00,23,00,36,00,26,00,33,00,35,00,64,00,61,00,\
  37,00,61,00,39,00,39,00,26,00,30,00,23,00,7b,00,35,00,33,00,66,00,35,00,36,\
  00,33,00,30,00,64,00,2d,00,62,00,36,00,62,00,66,00,2d,00,31,00,31,00,64,00,\
  30,00,2d,00,39,00,34,00,66,00,32,00,2d,00,30,00,30,00,61,00,30,00,63,00,39,\
  00,31,00,65,00,66,00,62,00,38,00,62,00,7d,00
0
 
LVL 9

Expert Comment

by:Krompton
ID: 17137745
B-M-C

My appoligies. I tested this further and it has been hit or miss. Let me look at it some more.

Sorry,
Krompton
0
 
LVL 5

Author Comment

by:B-M-C
ID: 17137969
I just tested it and it also didn't work for me! Thanks for your efforts though. I've just had an idea I'm going to test, will post details and results shortly.
0
 
LVL 9

Expert Comment

by:Krompton
ID: 17138246
B-M-C

Looks like my thought experiment failed. I could not seem to get the registry edits to work with any resonable consistancy.

Provided it does what the author intended; I think the best bet at this time would be to look at the link posted eariler. Let us know what you find with your own attempts or the program offered in the link. I believe many folks would be interested.

Krompton

 
0
 
LVL 19

Expert Comment

by:alextoft
ID: 17138736
The one way I got round this was to run a subst command during login as the system user, occupying the drive letter in system space (I just used it to clone the D drive for as many network drive letters as you need). The network drives are then mapped, and when removeable devices are plugged in and subsequently assigned letters by the system user they won't be allocated your network drive letters.

Then as part of a logout script the subst drives are removed. A reboot clears them automatically.

We use Netware & Zen serverside, so I did this using a scheduled task on the zen agent (on login... on logout... with system user impersonation), but I'm sure you can do with with group policy if you're unfortunate enough to be running Microsoft servers.
0
 
LVL 74

Assisted Solution

by:Jeffrey Kane - TechSoEasy
Jeffrey Kane - TechSoEasy earned 166 total points
ID: 17147543
The way I've done this is to create a FOLDER on your local drive and then MOUNT the USB Drive to that folder while also assigning a drive letter to it.

That's all that needs to be done.

Jeff
TechSoEasy
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 15

Expert Comment

by:Ryan_R
ID: 17150126
bmc, how did your test go?
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 17304646
Since Ryan_R's recommendation didn't work, and the asker never responded to my further recommendation, I'd suggest that either this be deleted without refund or split between Ryan_R and myself.

Jeff
TechSoEasy
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 17307709
i can only go by the fact that the process described above by myself has worked for me in the past and meets the criteria of bmc. Has anyone else tried this on their pc and found probs with it? If that wasn't *easy* enough the only way you could do it easier is to get a 3rd party app to do it. perhaps be consulting an EE programmer expert.
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 17307715
the fact that rindi nominated the post for acceptance would tell me that rindi has completed this process before and that it apparently works - maybe other circumstances preventing this from working
0
 
LVL 5

Author Comment

by:B-M-C
ID: 17317822
Hi all, just come back from a unplanned long absence hence the lack of response.

Regarding the further suggestions, TechSoEasy's suggestion isn't any easier for non-technically savy users to implement. I haven't yet had a chance since my return to test things I had in mind nor AlexToft's suggestion.
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 17318599
There's no technical savy needed to mount a drive.  Just open your computer's Help & Support and put "Mount a drive" in the search box for the step-by-step how-to.

Jeff
TechSoEasy
0
 
LVL 5

Author Comment

by:B-M-C
ID: 17318703
Oh you should see the people I have to support!
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 17319085
This isn't something for them to do... it's for you to do.  I would never push out a solution to 1000 users that requires them to do ANYTHING like this... if you can do it on one machine, then you can script it to happen on the rest.

Jeff
TechSoEasy
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 17321858
he's right, there are some things that your user's shouldn't need to know about doing. They could cause all sorts of problems let loose in Comp Management. Only Network Administrators should be allowed to access these functions.

Ryan R
0
 
LVL 5

Author Comment

by:B-M-C
ID: 17325234
OK let's recap.

My first line guys know perfectly well how to change a drive letter assignment for a removable frive on a remote PC. The problem is that currently they have to do this on all too frequent an occurrence. There's no question of asking the users to use the mmc themselves.

As we have discussed here,  the drive letter assignment for a particular USB removble device as stored in the registry is valid for that removable device only, which makes making rolling out a change quite possibly an impossible task, as unfortuantely I do not have a list of all the serial numbers of all the USB removable devices over a thousand users might use between them, and given there are only 26 letters in the alphabet it wouldn'thelp much if I did.

So the avenue I was exploring and seeking expert advice upon was a foolproof, automated script or exe to make available on our self-help intranet, which ordinary users can run, and which without their intervention detects the removable drive and changes its letter assignment.
0
 
LVL 87

Expert Comment

by:rindi
ID: 17325446
Checkout this utility, it may be what you need:

http://www.uwe-sieber.de/usbdlm_e.html
0
 
LVL 15

Expert Comment

by:Ryan_R
ID: 17330165
nice recap, will think about it more
0
 
LVL 74

Expert Comment

by:Jeffrey Kane - TechSoEasy
ID: 17330259
Truth is that I don't think this is a "simple" issue.  Check out this thread and it's EE references:  http://answers.google.com/answers/threadview?id=733055

Jeff
TechSoEasy
0
 
LVL 87

Expert Comment

by:rindi
ID: 17469091
Any news, B-M-C?
0
 
LVL 9

Expert Comment

by:Krompton
ID: 18179774
Rindi,

Just a small point; the link http://www.uwe-sieber.de/usbdlm_e.html was also posted by me in the 2nd post to this question. I have seen that others have used it and it seems to work well. Of course I would have perfered to hear from BMC about any solution that worked.

Cheers
Krompton
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now