Hi. Have you ever needed to know when a user ejected a USB device? If you have a file open on that device then the answer is probably yes. This script registers the device with Windows using RegisterDeviceNotification. Without registering your device with Windows you will still receive some default notifications such as 'DEVICEARRIVAL' and 'DEVICEREMOVECOMPLETE', however, after you register then you will receive 'DEVICEQUERYREMOVE' notifications. This allows your script to prepare for devi