How can I remove the option to eject SATA drives from the Windows 7 tray icon?

https://superuser.com/questions/12955/how-can-i-remove-the-option-to-eject-sata-drives-from-the-windows-7-tray-iconfrom–

Asked 
Viewed 171k times

89

The Safely Remove Hardware icon in Windows 7 offers the ability to eject my SATA drives, including the boot drive. I don’t see myself ever needing this – especially not from the convenience of the tray icon.

Is there a common BIOS setting to disable hot-swappability?

Eject internal SATA drives

  • 2
    Upon upgrading from Vista to Windows 7 RTM, my SATA drives no longer show in the Safely Remove Hardware menu, can you confirm that this is still an issue for you on the RTM version of Windows 7?

    – bdukes

    Aug 27, 2009 at 16:30

  • 12
    I wonder, how stable W7 runs after ejecting the boot HDD. Can you eject the CPU or the mainboard, too?

    Feb 14, 2011 at 5:06

  • 1
    Same problem in my Windows 8.1, and I guess this will be the same in all Windowses from 2000 through XP, Vista, 7 and 8. I suggest you add more tags 😉

    Feb 16, 2014 at 8:52

8 Answers

66

The answer really depends on what driver you’re set up with. I have a 6 port SATA connector (Intel ICH9 – 2922) and I use the default MS-AHCI driver. If you’re in the same boat, create a couple of new keys here:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\msahci

_

\Controller0\Channel0
            \Channel1
            \Channel2
            \Channel3
            \Channel4
            \Channel5

Now create a new DWORD – name: TreatAsInternalPort, value: 1 under each of the ChannelN keys. Now reboot for the changes to take effect and the drives should no longer show up under ‘Safely Remove..’

Geeky stuff:

The root cause of the problem is the SATA driver incorrectly determined that your internal SATA port is external. So, if you look at the ‘Capabilities’ value for your drive(s) under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\..\.. its probably set at 0x4 which makes it removable (as per the bit flag ORing done of the values below) Once you add the setting to the registry, the SATA driver now returns a different Capabilities value (most probably 0) and the drive stops showing up under ‘Safely Remove..’

//from inc/api/cfgmgr32.h (WINDDK)
#define CM_DEVCAP_LOCKSUPPORTED     (0x00000001)
#define CM_DEVCAP_EJECTSUPPORTED    (0x00000002)
#define CM_DEVCAP_REMOVABLE         (0x00000004)
#define CM_DEVCAP_DOCKDEVICE        (0x00000008)
#define CM_DEVCAP_UNIQUEID          (0x00000010)
#define CM_DEVCAP_SILENTINSTALL     (0x00000020)
#define CM_DEVCAP_RAWDEVICEOK       (0x00000040)
#define CM_DEVCAP_SURPRISEREMOVALOK (0x00000080)
#define CM_DEVCAP_HARDWAREDISABLED  (0x00000100)
#define CM_DEVCAP_NONDYNAMIC        (0x00000200)

27

Today I had the same problem after upgrading my Dad’s PC from Windows 7 to 10

The above no longer holds for Win 8, 8.1 & 10

What helped was a slight variation of this link How can I remove the option to eject internal SATA drives from the Windows 8 tray icon?

I.e. I added a new Multi String Value called TreatAsInternalPort to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device with the value:

0
1
2
4
5

(note the newlines)

TreatAsInternalPort registry setting

BTW The AHCI driver was Intel’s, not Microsoft’s, but the solution should work with both drivers.

  • 1
    This worked perfectly 😀 (I also updated from Win7 to Win10). Thanks! (Also I used Microsofts AHCI driver).

    Aug 25, 2015 at 23:20

  • 9
    Note: I had to add a newline after ‘5’ for the ‘5’ to stay – if I left cursor just after ‘5’ on same line, my value truncated after ‘4’. Windows 10.

    May 5, 2016 at 16:26

  • This worked perfectly for me as well, Win10 MSI X570 Ryzen9 with a SATA boot SSD that suddenly Windows allowed me to eject. Your registry change solved this after a quick reboot.

    – Toumal

    Jul 16, 2019 at 16:58

18

It’s a BIOS level option. In newer boards there are options in the BIOS to disable hot swapping (when you use AHCI/RAID as a controller). When the hot swap setting for a drive is disabled in the BIOS, it won’t be listed in the ejectable drives in the system tray icon menu.

  • This is the best answer. It’s vastly preferable to change a BIOS setting than a registry setting. Some of the registry settings are reset on boot.

    – crimbo

    Feb 21, 2019 at 20:36

6

Not sure about how common is it, but in CMOS (BIOS) Setup on Asrock motherboards the option called “Hotswap” modifies the behaviour. It’s available for each SATA channel. Also, there is “External SATA” option, but it’s off by default and I didn’t touch it.

  • 1
    It turns out, that there’s no such option in BIOS for some older ASRock motherboards – but then there’s an option for turning that off in Control Panel (like it’s described in @Randy Horca’s answer)

    – evgeny9

    Jul 26, 2020 at 22:35

3

If you have an NVIDIA chipset, the following registry edit should work for you …

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\nvata] 
"DisableRemovable"=dword:00000001 

Check out this description for more details.

2

follow this steps Go to CONTROL PANEL- DEVICE MANAGER – STORAGE CONTROLLERS – then right click the MARVELL91XXsata6g CONTROLLER choose POLICIES unpick the ENABLE SAFELY REMOVE DISK and press OK the restart your computer

  • And for ASRock motherboards it can be found under “IDE ATA/ATAPI controllers” / “Asmedia 106x SATA Controller” / “Properties” / “Policies” / “Enable safely remove disk”, like it is described at ASRock Forums.

    – evgeny9

    Jul 26, 2020 at 22:40

0

In BIOS, under Storage Configuration I changed ‘Configure SATA as’ from IDE to AHCI and that fixed it.

0

I also encountered this problem when I had a SSD as my boot drive and a HDD as an extra storage device.

I tried all the registry editing techniques. But none worked out, the only thing which worked out for me was to update the BIOS.

I was using a Dell notebook, I downloaded the latest BIOS upgrade from the dell.com/support site, entered the service tag, which I found in the BIOS menu, under maintenance, downloaded the driver and ran the program. The problem was rectified.

上一篇
下一篇