8

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.

4

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!

  • Thanks!! It's been days I've been trying to delete thoses files!! – billy Aug 12 '15 at 10:58
  • Changing the file's permissions wasn't enough in my case. I had to also change the permissions on the folder that contained the file and remove the group that the file belonged to. – Pikamander2 Oct 19 '18 at 9:36
1

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.

  • Going to give that a try, I couldn't for the life of me remember what that was called. – Kara Marfia Oct 29 '11 at 18:27
1

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.

0

I cannot confirm this, but every now and then, when I try to delete a user profile, Windows will not let me delete the user.dat registry file, saying it is in use. I know that it is not, but I have always thought that it was just because the name was the same as the one in use for the current user, which is from a different location. I tend to think this is a similar situation.

I would just format the drive and be done with it. If you really have doubts, you can search the registry for:

G:\Windows\SysWOW64\Macromed\Flash\flash9.ocx

  • Nothing in the registry in that path, but I think it would've had to be something sneakier, since neither Adobe nor Windows could really know about that path ahead of time. – Kara Marfia Jul 26 '11 at 14:13
  • As I said, since there is nothing on the drive you want, you can just format it. It will dismount the drive, close any open file handles, and just do it. – KCotreau Jul 26 '11 at 14:18
  • But then Adobe has won! Seriously, though, I'm dying to know what magic trick they're using that makes this the one single file that can't be deleted. – Kara Marfia Jul 27 '11 at 18:16
  • I already told you: It is not Adobe. It is the way Windows handles it sometimes. I have had it happen with the user.dat registry file in particular. – KCotreau Jul 27 '11 at 18:26
  • Except, again, I was able to delete every other single file on the drive. This is not standard Windows/OCX behavior. I'm familiar with Windows locking down files, but thanks anyway! – Kara Marfia Jul 28 '11 at 17:19
0

.ocx files are like .dll's in that they are components used by other programs. So if that other program is open it is likely considered "in use" by Windows.

If you have Internet Explorer or another browser open, that could be a cause. Internet Explorer is itself made up of a number of "COM" components and it's possible another program is using such a component which is loaded that particular .ocx. Seems silly, and it'd be nice if you could easily find which components belong to which program and which are currently active, but that's Windows.

(Edit: after reading your question more carefully, I don't think this is related to your issue. It's likely a permissions issue. Anyway the following still applies...)

You might be able to delete it from Safe mode. You defintely could delete it by booting a Linux live CD or Windows PE CD and deleting it from there.

Since the registry, particularly the user.dat part of it. comprises a user's account settings, you can be sure it's open and "in use" as long as you are logged in. For some reason it tends to stay opened after you logged off most of the time (likely by a program forgetting to close it before that program terminates). You can kill it by rebooting, logging in to another administrator account, and deleting it without logging in to that account.

  • I wasn't able to delete it in safe mode, but maybe I'll dig out that Ubuntu boot that I know is around here somewhere... – Kara Marfia Jul 26 '11 at 14:11
0

In addition to removing the deny permissions, I found I had to change the ownership properties.

Right click on the file or folder in question
Choose 'Properties'
Click on the Security tab
Click on 'Edit'
If 'everyone' is not present Click on 'Add'
Type 'everyone' (without quotes) and press OK

In the lower part of the dialog, choose 'Full Control' and then press OK

Try deleting again.

Edit:

Also, sometimes it is necessary to do this process with the parent folders containing the files in question.

0

1. iObitUnlocker

I buy new hard disk. Old hard disk I begin to use for backups my data. I manually remove some data from my old hard disk, but some folders not delete due to files with .ocx extension.

I can not delete my .ocx files use LockHunter and Unlocker programs.

But free iObitUnlocker program delete .ocx files. I need press select file → press Context_MenuiObitUnlockerLeft_Click to arrow down near Unlock button → Unlock & DeleteOK.


2. Demonstration

Demo

-1

Go into the file properties. Go into security, users. Don't click on the "Deny" Checkbox, but "REMOVE" the special permissions that deny access. Apply changes, THEN you can easily delete the file.

  • I highly doubt this is a permissions issue. – bwDraco Nov 24 '14 at 3:14
-1

start cmd as an admin . first we delete "ANONYMOUS LOGIN" who take control of the file . second we give full access to "anyone" to the file. third we delete flash folder and all files in it .

and wrote in it like this :

 cacls C:\Windows\System32\Macromed\Flash /e /r "ANONYMOUS LOGIN" 
  cacls C:\Windows\System32\Macromed\Flash /e /p "Everyone":f
  rd  <C:\Windows\System32\Macromed\Flash /s /q
  • 2
    For the benefit of OP and other readers, can you edit your answer to say what these commands do? :) – bertieb Aug 20 '18 at 15:27
  • ok no problem but why -1 for my answer :/ . – user3124235 Aug 20 '18 at 16:16
  • I didn't -1 / downvote so I cannot answer that, sorry – bertieb Aug 21 '18 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.