I was meddling with my flash drive today, when I discovered quite by accident that should you enable hidden files view, & copy the Desktop.ini file from your Desktop into a folder on your flash drive, that not ONLY will you be unable to delete the file, but it will change the folder name to Desktop as well.
_____
Use unlocker? Pffft! Cannot delete. Would you like to delete on reboot?
Copy another folder desktop.ini to overwrite it? Pfffft! "You need an additional 512 KB to copy these files." 8 GB 0 bytes free (This when 3 or 4 GB were free earlier!)
This shall get interesting. DON'T do what I did, hahahaha!
_____
* How did I get in this mess? I created a Winrar SFX to open a folder on the flash drive for an experiment. It worked great, except I included my Desktop.ini file in the rar file, since it makes you add a file. Technically, I forgot all about the 0 KB file method (Right-click/new archive then SFX the 0kb file), but AVG thinks 0KB Rar containers are some unknown possible trojan.
I couldn't extract to temp folder, else the command would try to run from the temp folder instead of opening the folder I wanted.
Ahhhhhhhhhyayyyyyyyy! Fun, fun, fun! At least this is interesting!
_____
And to note, that this DID work (until it refreshed & set the folder to Desktop + Desktop attrib. Took a minute or so....)
And afterwards, trying to run this file would result in a never-ending loop file that will not stop until you unplug the flash drive.
All because of changing it to Desktop.ini because the rar SFX extracted to the same folder I was running it in, because I did not have it set to extract to a TMP dir, because then it wouldn't open the folder using a relative path, etc, etc.
_____
Post Edit: And since the drive is formatted in UDF, it seems Windows somehow "finalized" or locked it, caused somehow by above process.
So, now, I can copy, but NOT delete files from the flash drive. Interesting. Very interesting. So, I have to copy all my files from the flash drive, re-format it, & copy it back. Hey, I didn't know I COULD set it to read only, lol! Guess I have to experiment some more & see what I can do about this. Who knows? Maybe I'll invent a flash drive lock tool for drives formatted in UDF!
_____
The Fix: I do remember I manually removed the file without safe eject because of the looping file earlier. This seems to be what caused the lockdown. Ran ChkDsk to fix it, & voila! Everything works now.
Seems to "lock the drive" all you have to do is remove it without safe eject, particularly under UDF. And to return it to writable status, simply fix the errors.
Don't really recommend this method of locking it,
Tried it on another machine since I have autoruns totally disabled, including auto-insert notification on this one.