AumHa Forums

Supporting Users of Windows Desktop Systems
It is currently Thu 7/29/10 04:22 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: The Care and Feeding of USB Storage Devices in XP
PostPosted: Sun 8/26/07 04:04 pm 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
USB storage devices seem like fool-proof plug-and-play devices -- until they suddenly stop working. Sometimes the device has died. More commonly they were not given proper animal husbandry. Some tips:

1. Assign them as "Sticky" drive devices.
XP is a multi-user client operating system. Drive device assignments are System Level operations using the Mount Manager. This means that restricted users cannot change drive assignments. It means that drive assignments made by User-A have no effect on User-B. It means that drive assignments made by a sole user of a computer will be overridden in the case of Network Shares and other devices that the XP Mount Manager is responsible for handling. And the litany of potential issues is actually a lot longer.

XP will mount your USB storage device on a dynamic basis; taking what it feels is the first available drive letter. This can cause Network Shares to disappear, or the USB device to disappear. And this behavior will often change the drive letter of the device for each user of the computer. It can cause each device to have a different letter. Moreover, if the USB device does not have a hardware ID (and many are not USB standards compliant in this way) the device will get a different drive letter depending on which USB port is used. Finally, it is not at all unusual to run out of assigned drive letters.

Confusing, no? Here is a list of workarounds. Pick the one best suited for your use of USB storage devices.
  • Pick a drive letter.

    Use Disk Manager and right click the drive; choose Change Drive Letter or Path. Pick a Drive Letter. If the USB storage device has a hardware ID (it is supposed to) this will be remembered the next time the drive is inserted. This setting has to be done in each User logon. It has to be done for each USB storage device you intend to use. And there is nothing particularly permanent about this assignment even for a single user.

    For those using Network shares that traditionally begin with Drive Letter F:, you can take the lazy man's approach. Move your CD, CF or SD Card Readers to high drive letters, freeing the lower letters below F: for use by Mount Manager with your USB device. You cannot move the Floppy letters A and B (well you can, but lets not go there); and you cannot move hard disk assignments for the System Volume (where XP boots from) or the Boot Volume (where XP runs from. Don't ask me to explain why you Boot from the System Volume and run the System from the Boot Volume, as no explanation ever satisfied me either.) So you move whatever devices remain to W, X, Y or Z in order for the USB device to be mounted below your Network Share (typically on F). Rating as a solution: C+.
  • A better solution is to add a new Service to specify these drive mappings for USB drives. By writing a small configuration file you can set the drive letter mapping for your USB device and have it be sticky This wonderful new service is called a USB Drive Manager. There are several. The one I recommend is by Uwe Seiber: http://www.uwe-sieber.de/usbdlm_e.html Rating as a solution: A.
  • Finally, the no-new software, "I did not know I could do that", method: use NTFS junctions instead of Drive letters.

    If you are using the NTFS filestore for your hard disk drive, use NTFS junctions to create a logical map between a new and empty folder on your drive and the USB storage device. This is a very elegant solution.
    • Create a new, empty folder on your hard disk. Give the folder a name that will distinguish one USB storage device from another. (I have one folder for my daughter: "Pink Hello Kitty"). You only need to do this once. This folder will be set as an NTFS junction point in the next step.
    • Now with the USB storage device inserted head to Disk Manager again and right click on the device. Choose as discussed earlier "Change Drive Letter or Path" and click "Add". Instead of a Drive Letter choose "Mount in an empty NTFS folder. Type into the input box (or Browse) to the new folder you created. Apply your changes. (You can also now remove the Drive Letter for the Device.
    Image
    Reference: http://www.pcstats.com/articleview.cfm? ... 676&page=9

    If the device is mounted, then clicking the new folder you created gives you complete access to the root of the USB Storage Device. If you can get used to Network paths, you can get used to NTFS junctions. Instead of:
    Copy C:\My Important Documents\*.* G:\backup

    You would write:

    Copy C:\My Important Documents\*.* C:\Pink Hello Kitty\backup

    Windows Explorer has no problems using this approach as a way of accessing your USB drive. If you click your new folder you will be viewing automagically the root of your USB drive. It is a sticky assignment. The junction will be made every time the USB storage device is mounted. Create once a new folder for each USB storage device, create the NTFS junction, and then forget about it. If the device is not mounted, you will get a device is unavailable error if you try and access the folder. On my computer I have a list of folders with suitable names for all of my various USB storage devices. I now longer worry about what drive letter may be assigned; I just click the folder name to open whatever device I have decided to plug-in that working session. Rating as a solution: A.
2. The Care and Feeding of USB Storage Devices.

I assume common sense will prevail in terms of physically handling, transporting and safekeeping these devices. Some less than obvious other care and feeding instructions:
  • Assign the drive a sticky drive letter or assignment, as above. Do not leave the process to the whims of XP's Mount Manager.
  • Disable any power options on the USB ports; you do not want the ports placed in stand-by or sleep mode.
  • Similarly, do not set power options for the drive itself. Do not let the drive be stopped as a power option in any mode.
  • Use the "Safely Remove Hardware" notification tray applet if it appears for any USB storage device..
  • Be fully aware of NTFS permissions if using the NTFS filestore for the drive. Know how to set, change, add and remove NTFS permissions if using the device on multiple computer systems.
    Ownership: http://support.microsoft.com/kb/308421
    All other NTFS Permissions: http://support.microsoft.com/kb/308418
  • External is not the same thing as Portable or Transportable. Most are not designed for throwing in a backpack or briefcase.
  • If using XP, disable any System Restore monitoring of the drive.
  • If using any encryption or drive security software, know it inside and out. Using such software may prevent the drive from being accessible at all on a second computer; or in some cases from a different USB port on the same computer.
  • Make backups of the drive. It is no safer as an archival method than any other, and likely less so than properly handled DVDs, CDs or tapes.
  • Know how to remove "phantom" USB devices from XP computers. You can quickly exhaust available drive letters by repeatedly starting up without the drive powered and connected; or by plugging and unplugging the drive. Phantom devices can be seen, managed and deleted through Device Manager, View, Show all Hidden Devices.

    Hotfix Heaven
  • Watch out for Upper and Lower Filter issues:
    A computer that is running Windows XP cannot detect a USB thumb drive, an Apple iPod, or an external hard disk drive
    http://support.microsoft.com/default.as ... &spid=3223
    .
  • Search and Check Microsoft for USB-related Hotfixes. Examples:
    USB Driver Performance Update (3/6/2008):
    http://www.microsoft.com/downloads/deta ... layLang=en
    .
    USB Reliability Hotfix (Brand new driver set for USB)
    http://support.microsoft.com/?kbid=918005
    .
    A USB device that is connected to a USB 2.0 hub is not detected in Windows XP Service Pack 2, Windows Server 2003 Service Pack 1, or Windows Server 2003 x64 versions
    http://support.microsoft.com/kb/892050/en-us
    .
    A USB device may not be re detected after a power cycle in Windows XP or in Windows 2000
    http://support.microsoft.com/?id=838989
    .
  • For Vista Only Complete new USB DLL and Stack (10/27/07):
    943599 The audio from a USB speaker is distorted after you connect an additional USB device to a Windows Vista-based computer
    http://support.microsoft.com/kb/943599/en-us
Best wishes.

3. Security Steps for Portable Music Devices and Portable Disk Drive Devices.

  • For the Computer: Disable Autorun on All Drive Letters That Could be Assigned to Portable Storage Devices.

    Windows XP: Download and Install Microsoft's TweakUI: http://www.microsoft.com/windowsxp/down ... rtoys.mspx
    • Obtain and install TweakUI (part of the PowerToys for Windows XP package), and then start TweakUI.
    • Expand the My Computer branch, then the AutoPlay branch, and then select Drives.
    • Turn off the checkbox next to every drive letter to disable AutoPlay -- except your CD/DVD drive letters.
    Windows Vista: You can use the Control Panel to control Autorun for Removable Drive Letters:
    Image
  • Protect the New Phone, USB Pen Drive, iPOD or other Portable Music Device.
    Most "Autorun" infections and worms (of which there are hundreds and they are ubiquitous) work by writing an Autorun.inf file to the root of storage device. It would be easy to do this yourself, and write-protect the result by making it Read-Only. But there is a terrific little freeware utility that will not only check first, and clear, any common Autorun infection, but write such a blocking file in a way that is particularly hard for an Autorun infection to defeat and replace -- (it creates a subfolder with a reserved device name). This file is also well known and excluded by major antivirus software programs, so you will not get a false alerts from doing a blocking action in this way. Recommended by me highly. (By MS-MVP sUBs):

    • Download and run "Flash Drive Disinfector©" by sUBs. It will do a cleanup of removable storage devices, and write a protected Autorun.inf file to help prevent re-infection.
      http://www.techsupportforum.com/sectool ... fector.exe
      There is no GUI interface or log file produced.

4. Editorial Note: Over time, this original post has become quite rich with advice about using USB Drive Manager software, and other advice. Please spend a few valuable minutes reading the rest of this thread.

Bill Castner

_________________
Users Helping Users
MS-MVP 2003 -- 2010 / ASAP Member / BBR MVM, VIP


Last edited by Bill Castner on Mon 3/24/08 09:06 am, edited 4 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun 8/26/07 09:25 pm 
Offline
AumHa Gold Supporter
AumHa Gold Supporter
User avatar

Joined: Wed 1/5/05 01:43 pm
Posts: 980
Location: Southern Appalachia USA
Some great nuggets here, Bill!

I was especially enlightened by the method of mounting a USB drive via NTFS junctioning to a created ad hoc folder.
You're right: "I did not know I could do that"!
Now I do, my thanks to you.
____
Joey


Top
 Profile  
 
 Post subject:
PostPosted: Mon 8/27/07 12:56 am 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
The folders you create may be ad hoc when created, but you leave them in place. On my computer I have a list of empty folders that are essentially placeholders for the USB storage devices I have and use. Every time I plug one in, it is automatically tied to the existing folder I defined in Drive Manager a while ago.

I do not worry about what drive letter is assigned to "Pink Hello Kitty". It can always be accessed if inserted by clicking the folder of that name.

However, some prefer using Drive Letters. See my earlier note on USB Drive Letter managers, or just write a script:

:: --------------- example
:: --------------- Drive letter mappings by script
:: --------------- USB devices are pre-assigned Junction Points

@echo off
::
:: Assign drive letter assignments to USB pen drives
::

if exist [C:\Pink Hello Kitty\nul] SUBST K: C:\Pink Hello Kitty
if exist [C:\Dad Work\nul] SUBST W: C:\Dad Work
if exist [C:\Darth Vader\nul] SUBST V: C:\Darth Vader

goto :EOF

:: ---------------------------------

_________________
Users Helping Users
MS-MVP 2003 -- 2010 / ASAP Member / BBR MVM, VIP


Top
 Profile  
 
 Post subject:
PostPosted: Tue 9/11/07 08:23 pm 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
Additional Note on the Removal of "Phantom" Devices

Device Manager does not display devices that are not connected to the Windows XP-based computer
http://support.microsoft.com/kb/315539/
(I use the advice given for Developers or Power users provided in the middle of the article for making the change persistent):

See also Fred Langa's little series on how to prevent phantom USB devices from being created:
http://windowssecrets.com/2007/04/05/01 ... om-devices
http://windowssecrets.com/2007/04/12/02 ... om-devices


Top
 Profile  
 
 Post subject:
PostPosted: Wed 9/19/07 05:05 am 
Offline
AumHa Gold Supporter
AumHa Gold Supporter
User avatar

Joined: Wed 1/5/05 01:43 pm
Posts: 980
Location: Southern Appalachia USA
Decided to also give Uwe Sieber's USBDriveLetterManager app a try, but having a little confusion writing an *.INI configuration file. I know I could manage without it, but I want to try this as a learning experience. Here's what I've done, so far (the three named USB drives below are real and in play, along with two firewire-connected devices). (I also have assigned drive letter "J" to a virtual DVD drive).
Quote:
[Settings]
AutoRunsOnLogon=1
DeleteMountPointsOnRemoval=1
NoMediaNoLetter=1
[BalloonTips]
Enabled
Timeout
ShowSize
WaitForLastVolume
SuppressWindowsBalloons
[DriveLetters1]
BusType=USB
DriveType1=REMOVABLE
DriveType2=FIXED
[DriveLetters2]
VolumeLabel1=Advntge128Mb
VolumeLabel2=Lexar256Mb
VolumeLabel3=Attaché1Gb
Letter1=G
Letter2=H
Letter3=I
[DriveLetters3]
Letters=%drive%\usbdlm.ini
Letter1=X
[DriveLetters4]
DeviceType=MSCR
Letter1=C:\CardReader\%DevName
[DriveLettersFirewire]
BusType=Firewire
Letter1=M
Letter2=N

Criticisms/Suggestions?

At this completion of your first year here Bill, you have contributed an amazing amount of time and technical information to AumHa's visitors and members.
Muchly appreciated!


Top
 Profile  
 
 Post subject:
PostPosted: Wed 9/19/07 08:06 am 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
INI files allow spaces, so I use them to make them easier to read.
If your ini file works, make no changes. We do not fix things that are not broken.

Quote:

[Settings]
AutoRunsOnLogon=1
DeleteMountPointsOnRemoval=1
NoMediaNoLetter=1

[BalloonTips]
;
; Not sure of your intentions here. If you want to modify default values, there must be a an "=0" or an "=1", or a parameter for each value.
; If you want to use Default values, just remove this entire section.
; My example edit shows a disabling of all balloon tip features
;
Enabled=0
SuppressWindowsBalloons=1

[DriveLetters1]
;
; Here is a Global definiton for USB
; I modify in other sections for particular devices
;
BusType=USB
DriveType=ALL

[DriveLetters2]
;
; A drivetype specification for certain devices
;
DriveType=REMOVABLE
VolumeLabel1=Advntge128Mb
VolumeLabel2=Lexar256Mb
VolumeLabel3=Attaché1Gb
Letter1=G
Letter2=H
Letter3=I

[DriveLetters3]
Letters=%drive%\usbdlm.ini
Letter1=X

[DriveLetters4]
DeviceType=MSCR
Letter1=C:\CardReader\%DevName

;
; edited "[DriveLettersFirewire]" -- syntax error on section header
;
[DriveLetters5]
BusType=Firewire
Letter1=M
Letter2=N


As for my Aumha anniversary, the listing shown in my Profile box is incorrect. It is a long story, but the short version: when I changed my email address a year ago I was unhooked from all my previous posts. Poor Jim Eshelman ended up having to delete me, re-add me, and manually reconcile my past posts with my new account. It was not a pleasant chore and I thank him for it. I will have been a member three years in November. A reader for many years.

_________________
Users Helping Users
MS-MVP 2003 -- 2010 / ASAP Member / BBR MVM, VIP


Top
 Profile  
 
 Post subject:
PostPosted: Wed 9/19/07 08:52 am 
Offline
AumHa Gold Supporter
AumHa Gold Supporter
User avatar

Joined: Wed 1/5/05 01:43 pm
Posts: 980
Location: Southern Appalachia USA
Bill Castner wrote:
We do not fix things that are not broken.
Should have that tattooed across my frontal lobes.
Bill Castner wrote:
I will have been a member [of AumHa] three years in November.
Now, I knew that. Oh, the attention deficit was MINE!
I wrote:
...Bill, you have contributed an amazing amount of time and technical information to AumHa's visitors and members.
I was at least dead-on right about this. Thanks for the guidance.
____
Joey


Top
 Profile  
 
 Post subject:
PostPosted: Thu 9/27/07 03:00 am 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
USB Drive Management

A very useful freeware utility by Nirtsoft is their USBDeview. This provides a great deal of information on USB devices that have been used on your workstation. You can use this utility to set various options for USB devices. You can use this utility to delete "phantom" device entries. Additional features allow the selection by device of AutoPlay.

Image

This is great freeware, and a must if you use a variety of USB pen drive devices. Recommended highly.
http://www.nirsoft.net/utils/usb_devices_view.html

_________________
Users Helping Users
MS-MVP 2003 -- 2010 / ASAP Member / BBR MVM, VIP


Top
 Profile  
 
 Post subject:
PostPosted: Thu 11/1/07 06:49 am 
Offline
AumHa Silver Supporter
AumHa Silver Supporter

Joined: Tue 1/23/07 10:04 pm
Posts: 65
Thanks Bill!

This was a very sweet fix to a big annoyance I had with my iTunes (iPod Software)

I have too much music to store on my laptop. I keep all my music files on an external HDD.

Every time I start iTunes, it has reset itself to look for music file in the default iTunes Music directory (in My Documents). I then have to redirect iTunes to look for my music files on my external each time I start the program and want to play music or sync my iPod from my Laptop.

With NTFS Junctions, I was able to finally make this permanent.

thanks again.

David


Top
 Profile  
 
 Post subject:
PostPosted: Sun 11/4/07 05:42 am 
Offline
Gold Member
Gold Member

Joined: Sun 2/16/03 05:21 am
Posts: 176
Location: Pembroke Pines, Florida USA
Quote:
You can use this utility to delete "phantom" device entries.



How do I determine which are, "phantom" device entries?


Top
 Profile  
 
 Post subject:
PostPosted: Sun 11/4/07 08:52 am 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
Any Device that shows as not connnected would qualify.
You likely would only remove such devices if a drive letter assignment was unsuitable, or you never intend to connect the device again.

For example, you may be using your notebook and have at school or work the need to frequently use a USB pen drive device once.

(The are called "phantom" devices because in Device Manager you have to use View, Show Hidden Devices, to see them. They appear in the subsequent listings in a light Grey color, hence the name "phantom" devices.)

_________________
Users Helping Users
MS-MVP 2003 -- 2010 / ASAP Member / BBR MVM, VIP


Top
 Profile  
 
 Post subject:
PostPosted: Tue 11/6/07 09:43 pm 
Offline
New Member
New Member

Joined: Tue 11/6/07 09:31 pm
Posts: 6
Location: Brisbane, Australia
Bill

Just started using NTFS junction assignments for my USB devices and I have a question

I routinely use multiple devices (ie a USB key and an MP3 player). I can assign them to junctions, however doing this removes any/all forms of identification from the remove hardware popup...

I assume they are listed in a first inserted, first listed basis, but don't really wan't to rely on that. I can identify them by right clicking on the tray icon, however this is a clumsy and inconvenient solution...

Is there some way that we can assign a junction point AND some form of identification to a device???

Target

_________________
2 + 2 will never equal 5
(not even for very large values of 2)


Top
 Profile  
 
 Post subject:
PostPosted: Wed 11/7/07 12:18 am 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
Not sure I understand your issue.
Is it that you do not receive notifications at insertion?
Is it that the notification you receive has no details, but formerly it did?
Is it that the "Safely remove hardware" notification applet does not appear at all?
When you right click the HotPlug manager shows all details, but not somehow otherwise?

I just do not understand the issue. The USB standard is for the devices to be hot swappable. This implies some care for a storage device that is actively being written. If you know that there is no active or pending write for the device, just unplug it.

Try the USB Drive Manger solution above as well. This has explicit controls over the HotPlug manager notification service. Download the software (free) and read the included help material for additional details of the notification service state that you can control.

_________________
Users Helping Users
MS-MVP 2003 -- 2010 / ASAP Member / BBR MVM, VIP


Top
 Profile  
 
 Post subject:
PostPosted: Wed 11/7/07 04:24 pm 
Offline
New Member
New Member

Joined: Tue 11/6/07 09:31 pm
Posts: 6
Location: Brisbane, Australia
Thanks Bill, I've been playing with it this morning and I think I see where the confusion stems from...

I had previously been assigning drive letters to my usb devices, and when you do this, the drive letter appears in the safely remove hardware notification (obviously you can see which device is which...)

The issue with this is that I am on a (large) network in the office, so this can potentially interfere with new drive mappings.

Assigning them to NTFS junction points resolves this issue, and means I effectively only need my shortcut (a much tidier solution for my money), however, now that there is no drive letter assigned, there is nothing in the safely remove hardware notification to indicate which device is which (they all have identical listings - Safely remove USB mass storage device.)


I have no issues with the connection and use of the devices, it's just the disconnection that's bugging me (a <i>very</i> minor gripe!!)

I'll look at the software and see if that helps...

once again, many thanks for your time and patience (and your comprehensive answers!!)

Target

_________________
2 + 2 will never equal 5
(not even for very large values of 2)


Top
 Profile  
 
 Post subject:
PostPosted: Wed 11/7/07 08:56 pm 
Offline
AH-VSOP & MS-MVP
AH-VSOP & MS-MVP
User avatar

Joined: Mon 9/18/06 12:32 pm
Posts: 16048
Location: Chevy Chase, MD
I see.

All that the Hotplug manager would be able to report was that the device was recognized; as far as the logical disk manager is concerned, no drive letter device assignment was made.

I do not bother with drive letter assignments when using the method discussed of using NTFS junctions. Drive letters are not necessary, as instead of an operation on drive_letter: you can use the path to the junction instead: C:\Hello_Kitty\.

However, I do show above a sample script to take the junctions points in conjunction with the SUBST command and assign drive letters to your junction points. My sample script is above, http://aumha.net/viewtopic.php?p=162839#162839

You would insert the drive. The junction point assignment (having been made previoiusly) would be connected. Then you would click the script above as a saved .CMD file (or a shortcut to it) to map a drive letter if one was desired. This would not help the hot plug manager, but it might help you.

_________________
Users Helping Users
MS-MVP 2003 -- 2010 / ASAP Member / BBR MVM, VIP


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group