Change from IDE to AHCI then Safety Remove Hardware

Hi

On a working Windows 10 I set BIOS from IDE to AHCI and then fix the Windows error with a lot of effort and finally it boots up, The Windows shows the internal hard drives in the Safety Remove Hardware icon.
Previously, I did this job for a lot of computers with success but this problem happens with 3 motherboards who has AMD SB700 southbridge.
How can I make these SSDs and HDDs not shown in Windows` Safety Remove Hardware?

  1. Get the bus number from drive (not partition) properties.
  2. Open regedit, path “HKLM\SYSTEM\CurrentControlSet\Services\storahci\Parameters\Device”
  3. Add REG_MULTI_SZ parameter named “TreatAsInternalPort”.
  4. The parameter should store the bus number you got from step 1.
  5. Reboot and this is it. I confirm this works.
1 Like

Thankyou for your great help. yes I did it and it fixed the problem.
I searched the internet with the TreatAsInternalPort key word, and it shows that source of the problem is BIOS which flag SATA hard drives as external:

I think the problem won`t happens when I first change the BIOS to AHCI, then install the Windows, is this wrong? i.e. the hard drivers will always shows in the Safety Remove Hardware for this particular motherboard, regardless of setting AHCI before windows’ installation or after?