Cannot delete flash9.ocx
Some kinda voodoo, indeed.
Bought a new boot drive, and it's time to use the old drive for data. I thought I'd save some time by just wiping the unneeded system folders, instead of backing up, formatting, and restoring. Wups!
I have a single Adobe file that absolutely will not be deleted. G:\Windows\SysWOW64\Macromed\Flash\flash9.ocx - though it may have started with a different file name. I'm able to rename it, oddly enough.
To be clear, the drive is currently plugged in externally. So I can boot the computer, plug this drive in afterward, and immediately attempt to delete. "File in use" box reads "the action can't be completed because the file is open in another program".
I'd format at this point, but it's my white whale, and I have to know if Adobe has inserted some nasty little registry hack - or whatever it is - making this impossible.
Since I'm sure it'll come up, I've taken ownership of the file - and this was the trick preventing me from deleting anything else on the drive - full rights on the file permissions, you name it, I've fiddled with the file itself.
I'm about to try uninstalling flash from the system drive, in case that aligns the planets properly. Sometimes I wish I were less stubborn, and could just format already.
Solution 1:
As it turns out, there were a couple of explicit "deny" permissions in the box. I'd forgotten that those override the "allow"s. Got rid of those and I was able to delete the file without a problem. Kind of embarrassing that I didn't see them before!
Solution 2:
Look for Unlocker 1.9.1 , a nice little utility to delete files that don't want to be deleted....usually constantly running in memory and not doing anything useful anyways.
Solution 3:
Kara's answer is correct. Adobe stuck two deny ACEs on the files:
DENY Everyone Write Attributes
DENY ANONYMOUS LOGIN Write Attributes
removing the first of these allows the file to be deleted. The second doesn't matter in this case.