É possível desativar o recurso de hot swap para unidades HDD ao usar o AHCI?

0

Eu tenho 3 drives SATA - 1 SSD e 2 HDDs comuns. Depois de alterar o modo do controlador HDD para AHCI e instalar o Windows 7, ainda tenho a opção de remover com segurança os dispositivos HW - discos. Toda vez que eu vou remover o cartão flash USB, eu me preocupo que eu acidentalmente desligue o drive do sistema (é possível?). É possível desativar esse recurso para esses 3 HDDs?

    
por Ladislav Mrnka 02.02.2011 / 22:44

1 resposta

1

link

Não tenho certeza se esse método pode ser adaptado a dispositivos não USB. Unidades de disco devem aparecer sob 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_63318F091111B

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_63318F091111B 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

    
por 02.02.2011 / 23:42