Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

USB HDD Drive letter

Status
Not open for further replies.

discofly

Technical User
Jul 21, 2003
16
GB
Hi all,

I have a question which touches on several areas - but I thought this was the best area - feel free to move it if you think it's better off elsewhere.

A project I'm working on requires me to pre-load a lot of information onto an external USB HDD. I need the files in read/write format and there are a lot of them so this seems the best way to pass onto the client.

However, if possible I want to put together a document with hyperlinks to the files - but in order to do this I need to know what drive their machine will map the USB drive to. Whilst I know this is virtually impossible - is it possible to setup some kind of .bat file (or similar?) to force the drive to map to a letter? If the letter is already in use, it could map to another? So - some simple coding would say "map drive to letter X - if letter X is in use, choose Y" - then I could provide hyperlinks to X or Y - and one should be ok?

Any ideas are gratefully received.

Mark
 
By default win assigns the next drive letter available.

I just opened control panel > admin tools > computer management > under storage 'disk management' and reset the drive letter to another (I: in my case). Plugged this drive into another XP PC amd it was recognised as I:.

You might try this at your location on other PC's as it appears that if you select a designation that is not likely to be used it will remain static. Caveat is if your client is on a network, they may have mapped drives that could interfere.

Post back if you do or do not observe the same.

Hope this helps

rvnguy
"I know everything..I just can't remember it all
 
rvnguy,

Many thanks - yes that works for me. I changed my external HDD to T: and it showed up as T: on another machine. Is there a simple .bat file I could include on the root directory of this drive to do this automatically once clicked?
 
Doing what you have done actually writes this info to the drive.

As this is done in the Win interface, not as what would have been DOS in the past, you could call the .exe but I do not know what the parameters, if any, to do the set needed. I would suspect that if you or someone you know could write a VBscript this could be accomplished.
File...I could not get it to invoke though.
dmadmin.exe in system32

As this info is on the drive now you should have no problems unless the letter is taken. You might run a check on a PC by using this letter for another device present and attaching the USB drive to see what behaviour this exhibits.


rvnguy
"I know everything..I just can't remember it all
 
Just to add on what rvnguy suggested. Try posting a similar thread in VB forum, someone there might be able to help you write the script.
 
Also, you could try a loop in a batch file that looks on every drive letter from A-Z for a file with a super special name like ylfocsid.206 and when it finds it, presto, record the drive letter of your usb drive.

det
 
Definitely a good candidate for KiXtart scripts. (in my opinion).
Here is a link to a UDF (user defined function) that finds the "Next Available drive letter".

You could use this script and add more for your needs and have it do as you specified.

That would definitely be my method.
Good luck!
 
I don't have the answer, but I believe there is a way. I have a couple of Sony Viao PCs and when I added additional hard drives the letters and icons got messed up in conjunction with the card reader and other removable devices. There was no way to fix it within the system, but after about 9 months of dealing with it Sony came up with a patch that fixed the problem. I have no clue how it worked, I only know it reassigned the correct drive letters and icons so my Memory Stick no longer looks like a HDD and vice-a-versa. Perhaps some programmer could reverse engineer their patch to do what you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top