Answer the question
In order to leave comments, you need to log in
How to handle the event of pulling out a flash drive in windows?
There is a task - to do certain actions in the system when the flash drive is physically pulled out of the usb socket.
For macOS it looks like this:
#!/bin/bash
tail -f /var/log/system.log | while read n; do
if
then
echo "blablabla";
fi
done
Answer the question
In order to leave comments, you need to log in
I hasten to please you that everything is very simple))
When you connect or disconnect a flash drive, events are generated in the Microsoft-Windows-DriverFrameworks-UserMode/Operational log. Right-click on the desired event, select "Bind task to event" and set up a task that will automatically run when the specified event occurs.
And who wants to rummage himself - then ALMOST everything is simple))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question