how to stop "unlist" sata drive in System Tray - "Safely Remove Hardware"?

R

RJK

Hello,

Does anyone know how stop the main boot drive (sata150 hd) being listed in
system trays' "Safely Remove Hardware" ?
....and a LiteON dvd rw drive as well, ...come to that !

I must have done it on my own machine ages ago (2xSATA hd's and 2 optical
dvd/cd drives), ...can't remember how !
....i.e I notice that on my own main PC sata and optical drives are not
listed for "safely remove hardware," though flash card reader bay drives I:\
J:\ K:\ AND L:\ could be "safely removed" ...which would mean a reboot
to get them back - if I removed them ?

....any pointers muchly appreciated.

TIA

regards, Richard

....OH ! ...how I wish I could remember how to do things on a PC, that I've
done in the past, ....or at least re-FIND that historic information in my
"how to" directory !!!!
 
O

Onsokumaru

I really wouldn't worry about it.

I think you will find if you try to "safely remove" your main HDD, XP will
not let you, saying it is in use, or something similar.

If you are so concerned try the reghack. It seems pretty simple, just do a
system restore point first.

You could probably use the same trick for your other devices, you would just
need to know what registry key to add the DWORD value to.

If you accidentally remove something else, you could try going into device
manager and "scan for hardware changes", and the device will probably
re-connect without a reboot.
 
U

Uwe Sieber

RJK said:
Does anyone know how stop the main boot drive (sata150 hd) being listed in
system trays' "Safely Remove Hardware" ?
...and a LiteON dvd rw drive as well, ...come to that !

I must have done it on my own machine ages ago (2xSATA hd's and 2 optical
dvd/cd drives), ...can't remember how !

From my archive:

This can be achieved by modifying a registry value.

Devices are shown there if they are marked as removable and
if they do no have the 'surprise removal ok' flag. These are
bit coded flags:

From cfgmgr32.h:
#define CM_DEVCAP_REMOVABLE (0x00000004)
#define CM_DEVCAP_SURPRISEREMOVALOK (0x00000080)

The device capabilities are found in the registry in a value
named 'Capabilities' under (sample for one of my IDE drives):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDECHANNEL\4&2527311&0&0

If you take away 4 from the value or add 80h and then
refresh the save removal dialog by toggeling the checkbox,
then the drive is gone.
But the value is reset when you attach the drive for the
next time or on next boot. This is hard coded into the driver
and read each time the drive is loaded. If you export the modified
value a reg file then you can silently load it on startup by
regedit /s hidecardreader.reg

The device id string of your drive (this
PCIIDE\IDECHANNEL\4&2527311&0&0 thing) is found in the properties
of the drive in the device manager. My ListUsbDrives tool
shows it too (the 'Ctrl DevID'):
http://www.uwe-sieber.de/files/listusbdrives.zip


Meanwhile I've added a function to do this to my USB
drive letter manager.
http://www.uwe-sieber.de/usbdlm_e.html
Still, you have to determine the device id, but everything
else is left to the USBDLM service.

In the USBDLM.INI set for instance for an USB drive

[HideFromSafelyRemoveHardware]
DeviceID1=USB\VID_058F&PID_6369

But you can use the drive's 'Friendly Name' too, like

[HideFromSafelyRemoveHardware]
DeviceID1=Multi Card Reader



Uwe
 
R

RJK

Thanks for your response, which I will further investigate.
I may try:-
http://www.tech-recipes.com:80/rx/1794/sata_drives_safely_remove_hardware_notification
first !

regards, Richard


Uwe Sieber said:
RJK said:
Does anyone know how stop the main boot drive (sata150 hd) being listed
in system trays' "Safely Remove Hardware" ?
...and a LiteON dvd rw drive as well, ...come to that !

I must have done it on my own machine ages ago (2xSATA hd's and 2 optical
dvd/cd drives), ...can't remember how !

From my archive:

This can be achieved by modifying a registry value.

Devices are shown there if they are marked as removable and
if they do no have the 'surprise removal ok' flag. These are
bit coded flags:

From cfgmgr32.h:
#define CM_DEVCAP_REMOVABLE (0x00000004)
#define CM_DEVCAP_SURPRISEREMOVALOK (0x00000080)

The device capabilities are found in the registry in a value
named 'Capabilities' under (sample for one of my IDE drives):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDECHANNEL\4&2527311&0&0

If you take away 4 from the value or add 80h and then
refresh the save removal dialog by toggeling the checkbox,
then the drive is gone.
But the value is reset when you attach the drive for the
next time or on next boot. This is hard coded into the driver
and read each time the drive is loaded. If you export the modified
value a reg file then you can silently load it on startup by
regedit /s hidecardreader.reg

The device id string of your drive (this
PCIIDE\IDECHANNEL\4&2527311&0&0 thing) is found in the properties
of the drive in the device manager. My ListUsbDrives tool
shows it too (the 'Ctrl DevID'):
http://www.uwe-sieber.de/files/listusbdrives.zip


Meanwhile I've added a function to do this to my USB
drive letter manager.
http://www.uwe-sieber.de/usbdlm_e.html
Still, you have to determine the device id, but everything
else is left to the USBDLM service.

In the USBDLM.INI set for instance for an USB drive

[HideFromSafelyRemoveHardware]
DeviceID1=USB\VID_058F&PID_6369

But you can use the drive's 'Friendly Name' too, like

[HideFromSafelyRemoveHardware]
DeviceID1=Multi Card Reader



Uwe
 
J

Jeff Barnett

RJK said:
Hello,

Does anyone know how stop the main boot drive (sata150 hd) being listed in
system trays' "Safely Remove Hardware" ?
...and a LiteON dvd rw drive as well, ...come to that !

I must have done it on my own machine ages ago (2xSATA hd's and 2 optical
dvd/cd drives), ...can't remember how !
...i.e I notice that on my own main PC sata and optical drives are not
listed for "safely remove hardware," though flash card reader bay drives I:\
J:\ K:\ AND L:\ could be "safely removed" ...which would mean a reboot
to get them back - if I removed them ?

...any pointers muchly appreciated.

TIA

regards, Richard

...OH ! ...how I wish I could remember how to do things on a PC, that I've
done in the past, ....or at least re-FIND that historic information in my
"how to" directory !!!!
Did you, in device manager, mark the sata drives to optimize for removal
instead of performance? (Just a thought?)

-- Jeff Barnett
 
R

RJK

Thanks Jeff,

Already spotted that one, and checked a while ago, - hd is set for
"perofrmance."
I have spotted a couple of possibilities, one is that it's to do with having
an Nvidia Nforce chipset on the board, (of the machine in question i.e. not
my main PC). Having said that, I could have sworn that I tweaked my
registry ages ago, when I fitted two SATA hd's to my main PC, to solve the
same issue. I've rummaged through my *.mht directory and can't find it,
....I try always to save such details for future reference.
http://www.tech-recipes.com/rx/1794/sata_drives_safely_remove_hardware_notification
....haven't tried this yet.

regards, Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top