Untested, but ... how about setting the file attributes to read-only and then, once this changes, revert the change by enabling write protection again?
What are you trying to do? Implementing some kind of hardware dongle? In that case I'd just try to get as much USB drive information as possible into your file to check against the drive's actual data (serial number, vendor id, etc.). Cause other "unmodified" PCs would still be able to change the drive, even while using some kind of file system filter.