When I try to safely remove hardware, Windows 10 tells me that a program is using the hardware, but doesn't tell me which program it is. I found that this information is recorded however in Event Viewer under System as Event 225 as such:
The application \Device\HarddiskVolume3\Program Files... with process id 4424 stopped the removal or ejection for the device USB....
This is pretty helpful information that I would like to see without going to event viewer every time. I have found that there is a button in Event Viewer which states Attach Task To This Event... When pressed, it offers the option to display a message every time this event is logged. I would like to have the task display the event details every time the event 225 gets logged. It seems like it could be possible, but I'm not a system level expert.
Is there an easy way to accomplish my goal? If not in the display message, is there a way to script a batch file to execute instead to tell me this information?