I think a lot of people may met with this message in Windows:”The device ‘Generic volume’ cannot be stopped right now”. The solution for it is restart “explorer.exe” process then you can safely remove device(Check details here: Fix “The device ‘Generic volume’ cannot be stopped right now” issue).
What if you manual this everytime which means you always get this issue? In this case, I suggest you to create a batch file to do this automatically. So everytime when you wanna restart explorer.exe just click on a batch file it can auto kill explorer process and open it up then close batch after 3 seconds.
Here is the code:
taskkill /im explorer.exe /f
start "" "C:\WINDOWS\explorer.exe"
ping -n 4 127.1>nul
Save this code to the Notepad and rename it with a descriptive name such as restart_explorer.bat and make sure you change the file type to .bat.