Removable USB Devices

Yet another fun little Vista issue. I haven’t posted one of these in a while.

I’ve got a 128mb SD memory card and I wanted to transfer some stuff to it, so I plug it into the computer.  The computer doesn’t recognize it for some reason – the drive letter is there, but it doesn’t show any device being there.  “Hmm”, I think, “Maybe I didn’t safely remove the device last time”.  So I right-click the drive and choose to safely remove it.

The SD card reader I have is mounted in a drive bay, and came with the computer.  It has a number of readers – four of them – and Windows unmounted all of them.  “Hmm”.

I put the SD card back in the reader, expecting the drive to re-appear, but no drive.  “Hmm”.

Open up Device Manager, and I see a little yellow triangle next to the reader.  image

Open Properties, and here’s what it says:

Windows cannot use this hardware device because it has been prepared for “safe removal”, but it has not been removed from the computer. (Code 47)

I guess what it wants me to do is open up the computer and disconnect the reader from the motherboard.  Thanks, but I’d rather not.  A reboot would fix it, but being a bit stubborn I tell Windows to disable the device and then re-enable it.  But Windows is on to this trick, and tells me I must reboot.

So a quick attempt to copy some files onto an SD card turns into a half hour distraction involving drivers and rebooting.  If only there was an OS where this stuff just worked.

2 Responses to “Removable USB Devices”

  1. Joshua Says:

    Not just Vista – Both XP and 2K does this to a user who has mistakenly clicked on the wrong “Safely remove USB Mass Storage Device – (Drive X:)” item on that little green ‘card’ icon. I’m on a hunt to find a solution, since as of my last acquisition, I have an array of 11 USB devices – drives and memory – plugged into my server. If I find something, I’ll post it back here, but don’t hold your breath. : )

  2. Frank Uebelhart Says:

    Since most SD card readers are plugged though a USB interface like this Radioshack one http://www.radioshack.com/sm-digital-concepts-sd-card-reader–pi-2280578.html I’m assuming yours is recognized like a USB storage. Right? Anyway, it is generally recommended http://support.microsoft.com/kb/310123 that you either UNPLUG the device physically or if it’s not acceptable – you HAVE to reboot a PC. So that’s not a problem but more of a warning message notifying you about the event and recommending you unplug the device once you told Windows that you want to remove it. That’s because of the CM_PROB_HELD_FOR_EJECT error that’s returned by the Device Manager. If you can’t remove it and don’t want to reboot, try ejecting the device by selecting the Eject command from the context menu for the removable drive in Windows Explorer tree (this will be above the Format command) . This however may lead to a warning message that reads
    ‘The device ‘Generic volume’ cannot be stopped because a program is still accessing it.’
    This problem is listed as solved at http://support.microsoft.com/kb/305372 back in 09-Oct-2001 although it seems to exist at least on Windows XP SP2 so that you may get this error if you try to safely remove a USB device AFTER you’ve selected the Eject command from the context menu. If you read the error description it says that ‘You receive this error message although no program is accessing the device’. That is you can safely remove your device after that without getting a code 47 error. Moreover, if you look into ProcessExplorer and try to find a handle for the USBSTOR device you will not find any handles what may indicate that NOTHING in fact uses the device. If so, you may just unplug the device. There’s yet another option you can Eject your drive without getting the error specified above. This may however lead to the same issue with a warning notifying you about the need to unplug the device. Here what you could try:
    1. Click Start|Control Panel|Administrative Tools|Computer Management or just click Start|Run and type compmgmt.msc then press Enter
    2. In the Computer Management snap-in window opened navigate to Storage|Removable Storage|Libraries.
    3. Find there your connected device, right-click it and select Eject
    The device will be ejected silently.

    4. Alternatively, open the same Storage|Removable Storage tree item and navigate to Media item
    5. Locate your attached storage device and select Eject from the context menu. The media ejection wizard will start for you. Follow the steps to finish with device ejection procedure.

    The problem here is that most device drivers cannot be restarted without rebooting a PC. Thus if you want to stop or restart the CD-ROM driver typing something like
    net stop cdrom
    won’t help as you’ll get the ‘The requested pause or stop is not valid for this service.’ message from the Service Control Manger. This is because this service/driver was made so that it doesn’t accept this command. That is such service is not marked as stoppable and eturns no sign on that when calling the http://msdn2.microsoft.com/en-us/library/ms686241.aspx SetServiceStatus function.

    If you don’t want to mess this up in the future it’s probably better to disable the use of the device completely. I use that to prevent my user from using unwanted devices or just to prevent them from getting problems like that. The complex thing however is to configure who will be allowed to use this device and whose access will be forbidden. Partially this can be solved by using a paired technique where the workaround is to first use the ‘ifmember’ tool that evaluates the device security policy appliance at the user’s logon and apply the device blocking after that by calling the devcon tool from Windows DDK. However this adds some extra work to resolve issues when you need to make some exclusions based on the user environment. For example it’s not for every day use when you want your user to not have access to his WIFI device. For example we maintain a security policy when every guest user that comes into our office has some restricted access to our some part of our local network as well as a mail access to be able to communicate with colleagues. Sometimes you have to disable the use for mobile devices, or more importantly the write access to CD-ROM or FireWire attached HDD storage. This involves LOTS of work in scripting that evaluates events and parses multiple parameters including information from Active Directory as well as information that is unique for the single user. I spend weeks trying to build a reliable custom made solution but finally found an easy workaround for all my pressing needs. The answer was to use desktop management tool that allows configuring user computers based on the rules set. I tried several solutions but among all of them the most easy to use and lightweight one was Scriptlogic’s Desktop Authority which I currently use in my production environment. That tool allowed me to configure extensive device lockdown policies http://www.scriptlogic.com/desktop-authority-usb-device-lockdown.asp based on Active Directory information without the need to link something in GPMC. That allowed me to precisely configure device use from every single user using personalized security policies that depend on the environment state. For example if the user connects his cell phone to his notebook he will not be able to use it. However if he connects the phone to his desktop PC he may use it as I know that for his desktop PC I have special security lockdown rules that guarantee that no sensitive information will leak from our company. I found that device management should be controlled centrally involving the use of functionality available from Desktop Authority, system internal policies and some custom self-written solutions. It provides the best protection and helps me stay sure that I control the use of devices on every PC that logs into my domain.

    By the way if you want to open the safely remove hardware dialog box programmatically, you can run
    RUNDLL32.EXE SHELL32.DLL,Control_RunDLL HotPlug.dll

Leave a Reply

 




 
buy cheap Endep online buy cheapest Endep and Endep how to order Amitriptyline online without prescription buy Amitriptyline without rx from us pharmacy online Amitriptyline purchase purchase online prescription Amitriptyline without purchasing Amitriptyline online without prescription order generic Amitriptyline buy Endep no prescriptions how to order Endep online without prescription comprare Endep generico Endep online buy Endep in england buy cheap Endep online free consult Endep purchased online without prescription what is Endep Endep tabletten buy Endep no perscription cod Endep non rx fedex overnight free want to buy Anafranil in usa Aricept overdose buy discount Aricept on line Aricept buy Aricept online Aricept order buy Aricept pills Nizoral suppliers cheap order rx Nizoral canada Nizoral order Nizoral usa cod comprar Nizoral generico buy Nizoral 200 mg buy cheap Nizoral under without rx buy cheap Nizoral with dr. prescription Prozac 200 mg buy Lisinopril australia el Nizoral generico buy Lisinopril tablets without rx next day delivery Lisinopril with no script buy Lisinopril c o d purchase arimidex no scams order Arimidex order amex Arimidex canadian pharmacy buy Arimidex without doctor order rx free Arimidex buy Abilify with american express buy Abilify cod order Finpecia without a prescription cheap order rx Finpecia purchase Famvir no visa online without prescription buy Famvir paypal without rx buy Famvir without Famvir without prescription medications Famvir without persription purchase Famvir online no membership overnight shipping Famvir no physician approval Amitriptyline purchase order Amitriptyline free next day airAmitriptyline on line Valtrex no rx needed cod accepted buy next day Fluoxetine buy Fluoxetine line purchase Fluoxetine cod delivery buy Fluoxetine 20 mg purchase Fluoxetine buy cheap Fluoxetine under without rx purchase Fluoxetine visa without prescription Fluoxetine by mail Fluoxetine for pets Fluoxetine 10mg Amitriptyline purchase online how to order Famvir online without a rx Prozac Amitriptyline no perscription Famvir next day purchase Anafranil no prescription cheap buy cheapest Anafranil next day delivery on Anafranil saturday Anafranil buy Anafranil buy Anafranil overnight where to purchase Anafranil no prescription no fees Anafranil drug buy Lisinopril where Lisinopril buy on line order Lisinopril online no membership overnight shipping no prescription required for Lisinopril order maxalt cash on delivery Maxalt from canada buy cheapest Maxalt purchase Maxalt visa without prescription buy Maxalt uk Maxalt 10 mg purchase Maxalt no visa online without prescription purchase generic Lisinopril online Lisinopril no prescription to buy maxalt order online no membership overnight how to get a arimidex rx Aricept without a perscription fedex Aricept overnight without a prescription Donepezil prescription order buy genuine Aricept Aricept uk sales prescription Proscar buy Proscar pay cod Maxalt apotheke buy no perscription Proscar purchase Proscar online buy cheap fedex Prednisone maxalt with no presciption buy Maxalt shipped cod Proscar online Prednisone order buy Amitriptyline with amex Accutane 40 mg delivered overnight buy brand Accutane 40 mg Accutane 40 mg orderd online without prescription where to purchase generic Accutane 40 mg online without a rx how to get 40 mg Accutane without next day delivery 40 mg Accutane with no script buy Amitriptyline online Accutane 40 mg online no prescription buy Accutane 40 mg online us pharmacy Accutane 40 mg best buy buy Accutane 40 mg c o d order 40 mg Accutane cash on delivery no presciption 40 mg Accutane