Merging modern software development with electrons and metal
Random header image... Refresh for more!

Make SATA Drives Non-Ejectable In Windows

I recently had the problem that my internal SATA drives were showing up in the Windows 7 Safety Remove Hardware and Eject Media tray icon.  Since I don’t plan on ejecting my internal drives, I decided to solve the problem.

This How can I remove the option to eject SATA drives from the Windows 7 tray icon? Q&A gave the information I needed (I mainly used the first answer), but didn’t spell out how to find the correct driver.  So I will go over the procedure I used.  Note: if you’re not comfortable with hacking Windows, don’t do this!

  1. My configuration is an Asrock 960GMUS3S FX motherboard with a Samsung 840 Pro SSD on the first SATA 3 channel and a WD HDD on the second SATA 3 channel.  The first SATA 2 channel is used for eSATA; the last 3 channels are currently unused.
  2. First open up the Device Manager, find the controllers section, right click on the appropriate controller, and click on the Properties item.  In my case, both drives are on the Asmedia 106x SATA Controller under IDE ATA/ATAPI controllers.

    Device Manager

    Device Manager

  3. Click the Driver tab.

    Controller Properties

    Controller Properties

  4. Click on the Driver Details button.

    Driver Details

    Driver Details

  5. Note the name of the driver file; in my case, it’s asahci64.sys
  6. Now the procedure pretty much follows the Q&A.  Start by opening Regedit.
  7. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services, and then find the name that matches the drive file name in step 5 (asahci64 in my case).
  8. Add the keys as specified in the Q&A.  In my case, I added Controller0, and under Controller0 I added Channel0 (for the SSD) and Channel1 (for the HDD).  Under each channel, I added the DWORD value TreatAsInternalPort, and then set the value to 1.
    1. Here’s a screen capture of my updated registry:asahci_registry
    2. Here’s a REG file I created that does the job:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\asahci64\Controller0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\asahci64\Controller0\Channel0]
"TreatAsInternalPort"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\asahci64\Controller0\Channel1]
"TreatAsInternalPort"=dword:00000001
  • Reboot and verify everything works as expected (it took me a few tries to get everything right).

2 comments

1 Very Annoyed and Angry { 07.24.15 at 11:33 am }

Does not work with asstahci64 !!! ???

FAIL !!!

2 Thermal { 12.12.15 at 1:32 am }

Same here on asstahci64.

Leave a Comment