Is it possible to turn off hot swap feature for HDD drives when using AHCI?

0

I have 3 SATA drives - 1 SSD and 2 common HDDs. After changing HDD controller mode to AHCI and installing Windows 7, I still have choice to safely remove HW devices - disks. Every time I'm going to remove USB flash card I worry that I accidentally turn off system drive (is it even possible?). Is it possible to turn off this feature for those 3 HDDs?

Ladislav Mrnka

Posted 2011-02-02T21:44:02.007

Reputation: 588

possible duplicate of How do I remove the option to eject SATA drives from the Windows 7 tray icon?

– sblair – 2011-02-02T23:40:44.347

Answers

1

http://www.eggheadcafe.com/software/aspnet/30495127/remove-hardware-from-safely-remove-hardware-list.aspx

Not sure if this method can be adapted to non USB devices. Disk drives should show up under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE .

This can be achieved by modifying a registry value. So far I had no time writing a little tool for this...

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:

The device capabilities are found in the registry in a value named 'Capabilities' under (sample for one of my USB flash drives): HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_058f&Pid_6331\058F091111B

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. This is hard coded into the driver and read each time the drive is loaded. If you export the modified value an reg file then you can silently load it on startup by regedit /s hidecardreader.reg

The device id string of your card reader (this Vid_058f&Pid_6331\058F091111B thing) is found in the properties of the USB device in the device manager. My ListUsbDrives tool shows it too (the 'Ctrl DevID'): http://www.uwe-sieber.de/files/listusbdrives.zip

Moab

Posted 2011-02-02T21:44:02.007

Reputation: 54 203