The complete message is as follows:
The application SearchIndexer.exe is preventing this device from being stopped
You can disconnect your external storage device from your computer directly but it is not recommended. Disconnecting the storage device without using the Safely Remove Hardware feature may not only result in the loss of data (if you are writing data on it) but also corrupt your storage device. If you are receiving the error message written above while ejecting your USB storage device, you can try the following fixes: Before you begin, you might want to open Services Manager, locate Windows Search service, right-click on it and select Restart,
1] Restart Windows Explorer
Restarting Windows Explorer can fix performance and other minor issues. The steps to restart Windows Explorer are simple. After restarting Windows Explorer, eject your USB storage device and check if the issue persists.
2] Disable Search Indexing on your external storage device
It is clear from the error message that the problem is occurring due to the Windows Search Indexing. Therefore, disabling the Search Indexing on the external device can fix the problem. Check if Search Indexing is enabled for your USB storage device. If yes, disable it. The following instructions will guide you on this.
After that, you will see that Windows has started indexing the files. Wait till the Indexing gets completed. After that, close the Indexing Options window and eject your USB storage device. Read: Can’t eject External Hard drive Drive or USB.
3] Rebuild Search Index
If the above methods did not solve your problem, rebuilding the Search Index should work. I also experienced this issue on my PC while ejecting the Sony Pendrive and I was able to fix it by rebuilding the Search Index.
The steps to rebuild Search Index are as follows: The rebuilding Search Index will take some time. When the process gets completed, you will receive the Indexing complete message on the Indexing Options window. After the completion of the rebuild process, you will be able to eject your external device. Read: Fix A device which does not exist was specified Disk error.
4] Change Device Removal Policy
If none of the above methods work for you, change the Device Removal Policy so that you will remove it without using the Safely Remove Hardware feature. The following instructions will guide you on this:
The Quick Removal policy manages the storage operations in such a manner that users can remove their storage devices anytime without using the Safely Remove Hardware feature.
Can’t eject hard drive because a program is using it Windows 11/10
You may get the following error message while ejecting your USB storage device by using the Safely Remove Hardware feature. The error message shows that a program is running on your system and is preventing the device from being ejected. The fix to this problem is simple. You have to close all the running programs. If this does not work, restart Windows Explorer. You can also try some other methods like configuring the Device Removal Policy, using Diskpart to get the drive offline, etc. TIP: USB Disk Ejector and USB Disk Ejector are free tools that can help you eject external drives.
How do I stop a Generic volume device?
Restarting Windows Explorer may help you stop the generic volume device. You will also get the “Windows can’t stop your ‘Generic volume’ device…” error if your antivirus is scanning it. Let your antivirus finish the scan. After that, you will be able to remove the device safely. But if you are in a hurry, you can stop your Generic volume device by terminating the antivirus scan. If you have opened multiple programs, one of those programs might be using the Generic volume device. In this case, closing the running programs will stop the Generic volume device. Hope this helps.