none
Safely Remove Hardware Icon?

    Question

  • I am trying to get the "Safely Remove Hardware" icon to appear in the system tray when a USB Flash disk is inserted in the target.

    My "Rollup 1.0"-based image includes both the "Safely Remove Hardware Program" and "Tray Icon Add/Remove Support" components.

    When I insert a USB flash drive, the driveis detected and available in Explorer, but the system tray icon never appears -- As if the drive is a fixed drive.

    What things can/should I check?


    Tuesday, June 26, 2007 2:27 PM

Answers

  • I have found the culprit in this case: The USBSTOR.SYS driver.

    I managed to recreate a situation where the SRH icon would appear if I changed my image copy of this driver to an older version. I could successfully go from no SRH icon to expected SRH icon behavior just by copying the  older version of this file over the newer version and back.

    To me this implies that there is a defect in the FP2007 USBSTOR.SYS driver - How do we submit bug reports for components like this?

    Details:

    Works: (SRH icon appears every time when USB Flash drive is installed)

    USBSTOR.SYS
    File Version: 5.2.3790.0 (srv03_rtm.030324-2048)
    Size: 24064 Bytes
    Modified Date: Tuesday, March 28, 2003 8:00:00 AM

    Doesn't Work: (SRH icon does not appear, even though the drive is mounted and available in Explorer)

    USBSTOR.SYS
    File Version: 5.3.1201.0
    Size: 27648 Bytes
    Modified Date: Friday, May 25, 2007 1:56:06 PM


    Wednesday, July 11, 2007 3:09 PM

All replies

  • Another piece in the puzzle:

    When I plug the device in and look at it's properties via Windows Explorer, the Policies tab shows both options ("Optimize for quick Removal" and "Optimize for Performance") grayed out, with "Optimize for Performance" selected.

    Looking in the registry for the key:
    HKLM\CurrentControlSet\System\Enum\USBSTOR\<Deviceid>\DeviceParameters\ClassPnP\
    UserRemovalPolicy

    The \ClassPnP\ key does not exist under DeviceParameters.

    What causes Windows XP to mark USB drives with "Optimize for Quick Removal" by default?



    Tuesday, June 26, 2007 2:47 PM
  • It looks like "Optimize for Performance" is what I want, in order to get the "Safely Remove Hardware" icon to show up, yet it doesn't.

    So I tried some experiments:

    First, I tried plugging in a different key - One that the system has not seen before. The icon shows up just fine, and left-clicking on it shows that only the second key is listed for removal.

    I removed the first key and inserted it into a different port on the target, and it shows up in the Safely Remove Hardware list.

    If I do a remove and re-insert it into the original USB port, it is again listed as expected when I left-click on the "Safely Remove Hardware" icon.

    So it appears that by having the device show up on more than one port causes it to be marked as removable, or for some other reason the system suddenly starts seeing the device as one that can be "Safely Removed".

    I'm going to re-image the system and try it again to see if it repeats.

    Tuesday, June 26, 2007 3:42 PM
  • I re-imaged the system and the behavior is exactly as described before. I noticed on additional item, however: If I remove the key that caused the  Remove Hardware icon to appear the first time - Let's call that one "Key #2", then the Safely Remove Hardware icon disappears.

    It looks like the Safely Remove Hardware icon only appears when Key #2 is inserted into the target.

    If Key #2 is already inserted, and Key #1 is then inserted, both show up in the Safely Remove Hardware list (Left click on the icon).

    If both are in the list and Key #1 is removed, Key #2 remains in the list, and the Safely Remove Hardware icon is still present.


    Tuesday, June 26, 2007 7:49 PM
  • Some more information:

    - Booted the system
    - Inserted a fresh-from-the-package USB flash disk
    - Safely Remove Hardware (SRH) icon is not visible.
    - Launched HotPlug Manager manually using the following command line (Start -> Run)

    Code Snippet

    RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll



    - No devices are listed in the HotPlug Manager.
    - Inserted a 28-in-one media card reader
    - SRH icon is visible!
    - HotPlug Manager only lists the media reader
    - Remove and re-insert the USB flash disk
    - USB flash disk now shows up in both HotPlug Manager (As a Mass Storage Device) and in the SRH menu.

    My feeling at this point is that there is something causing the USB flash drives (I have used many different brands) from being recognized as removable. I don't know what has changed with this image, however.

    Anyone have any ideas?
    Monday, July 09, 2007 9:22 PM
  • I have found the culprit in this case: The USBSTOR.SYS driver.

    I managed to recreate a situation where the SRH icon would appear if I changed my image copy of this driver to an older version. I could successfully go from no SRH icon to expected SRH icon behavior just by copying the  older version of this file over the newer version and back.

    To me this implies that there is a defect in the FP2007 USBSTOR.SYS driver - How do we submit bug reports for components like this?

    Details:

    Works: (SRH icon appears every time when USB Flash drive is installed)

    USBSTOR.SYS
    File Version: 5.2.3790.0 (srv03_rtm.030324-2048)
    Size: 24064 Bytes
    Modified Date: Tuesday, March 28, 2003 8:00:00 AM

    Doesn't Work: (SRH icon does not appear, even though the drive is mounted and available in Explorer)

    USBSTOR.SYS
    File Version: 5.3.1201.0
    Size: 27648 Bytes
    Modified Date: Friday, May 25, 2007 1:56:06 PM


    Wednesday, July 11, 2007 3:09 PM
  • Wow, nice work...

     

    Would like to hear why this happend!

     

    Rudi Grobler

    http://dotnet.org.za/rudi

     

    Thursday, July 12, 2007 4:22 PM
  • The root cause of this one was that I had included the "USB Boot Mass Strage Device Update" component in my build, which is used for USB 2.0 booting from USB Drives.  This process makes USB flash drives look like fixed disks - Hence no "Safely Remove Hardware" icon is displayed (You don't want to remove them).

     

    If I remove this component from the build, all is well again.

     

    Desi

     

    Credit: Microsoft Product Support. Thanks, Mark and Khalid!

    Monday, July 16, 2007 1:50 PM
  •  

    I am sorry if it is too basic:

     

    How can I remove this component from the build?

    Saturday, October 06, 2007 8:12 PM
  • what is the resolution to this issue?  I run XP Pro on an Alienware pc and have the same issue - I can't get the "safely remove hardware" icon to appear in the system tray.  When I startup in the mornings I figure it just never loads.  It does not appear when using any of the USB ports, so my work around has been to open My Computer and to eject it that way.  

    Thursday, January 17, 2008 4:03 AM
  • legend100,

     

    This is a forum specifically for Windows XP Embedded, which is a little bit different than XP Pro - You can add, remove, and upgrade components individually.

     

    If you look two posts up from yours, there is a post that starts out with "The root cause...". That is the answer to the original issue. Unfortunately for you, it does not apply to Windows XP Pro.

     

    You can set up a shortcut on your desktop with the target set to:

    Code Block

    %windir%\system32\rundll32.exe shell32.dll Control_RunDLL HotPlug.dll

     

    Target Location: system32

    Start In: %windir%

     

     

    and it will manually launch the HotPlug manager application, which will allow you to manually remove hardware.

     

    Regards,

    Archilea

    Thursday, January 17, 2008 1:55 PM
  •  Desi Richards wrote:

    The root cause of this one was that I had included the "USB Boot Mass Strage Device Update" component in my build, which is used for USB 2.0 booting from USB Drives.  This process makes USB flash drives look like fixed disks - Hence no "Safely Remove Hardware" icon is displayed (You don't want to remove them).

     

    If I remove this component from the build, all is well again.

     

    Desi

     

    Credit: Microsoft Product Support. Thanks, Mark and Khalid!

     

    Thank for your solution.

     

    However, how can I solve dependency checked if it is a required component?

     

    Have you encountered some red cross marks in User Control panel?

     

    Regards,

    Tuesday, February 19, 2008 6:31 PM
  • I am not receiving the Safely Remove Hardware icon in my system tray.  Is there any way to resolve this?

     

    Tuesday, March 18, 2008 2:39 PM
  •  

    hi

    How can I remove this component from my computer?

    Saturday, April 19, 2008 3:55 PM
  • hi

    how can delete "Safely Remove Hardware"
    Saturday, April 19, 2008 5:41 PM
  • desi, thanks for the info.  i'm interested in achieving the opposite, make a removal usb flash disk look fixed so it can be booted.  you mentioned the component (in xp embedded?) "USB Boot Mass Strage Device UpdateUSB Boot Mass Strage Device Update"      where might i be able to find this for vista?  if possible...

    Sunday, September 28, 2008 3:09 AM
  • Hi there

    I had a similar issue here as Desi Richards did and although slightly different as you will see from my thread, I believe the same solution solved it, rolling back the usbstor.sys.

    Another client of mine having built the SP3 build noted that the Audio Drivers were also not working first time.  He had reinstalled the SP3 and boom now working, what is it that is not being done properly on the builds that I have done for this to not work?

    Is it the SP3 updates the way that they work on the Embedded?  Is there something else dependent that is missing?

    Thanks
    Friday, February 12, 2010 10:19 AM