One of the issues with external storage devices is that unplugging them right away without using the “Safely Remove Hardware” feature is not safe and doing so could lead to data corruption and data loss. However, in some cases, even when you use the “Safely Remove Hardware” feature, you could get an error that says:
“Windows can’t stop your ‘Generic volume’ device because a program is still using it. Close any programs that might be using the device, and then try again later.”
It is possible that the system is still using the external device – for instance, a copy operation might still be in progress, or Windows is still indexing the contents of the drive in the background or it could also be that the drive is not configured to be quickly removed. To fix this error, there are a couple of suggestions you can try. You can try to close all the open programs and file explorer windows, or you could also configure the Device Removal Policy or change its file system to FAT32. In addition, you can also try to change its drive letter or use the DISKPART utility to get the drive to be offline or simply manage the hogging process that prevents it from being safely removed.
Follow each one of the given potential fixes below to resolve the error when using the Safely Remove Hardware feature.
The first thing you have to do to resolve the error is to close any open programs as well as File Explorer windows. This is because there are some programs and File Explorer instances that could be using the external device in the background which explains why you’re getting the error when you try to safely remove your device.
The next thing you can do is to configure the Device Removal Policy. How? Refer to these steps:
You could also try managing the hogging process to get rid of the error.
The next thing you can try to resolve the issue is to use DISKPART. Refer to the given steps below to do so.
If you keep getting this error on a particular USB device, you might have to format the disk and change its file system to FAT32. Make sure that you copy its contents safely into another location before you format the disk. Keep in mind that formatting the disk will remove all the contents of your drive.
powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/s,/c,net stop "icssvc" & REG ADD "HKLMSYSTEMCurrentControlSetServicesicssvcSettings" /V PeerlessTimeoutEnabled /T REG_DWORD /D 0 /F & net start "icssvc"' -Verb runAs"
“ehshell.exe – Common Language Runtime Debugging Services Application has generated an exception that could not be handled. Process id=0xa18 (2584), Thread id=0xa24 (2596).”
Click for 32-bit Operating System
Click for 64-bit Operating System