Cannot delete flash9.ocx

8

1

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.

Kara Marfia

Posted 2011-07-25T21:22:43.230

Reputation: 2 000

Answers

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!

Kara Marfia

Posted 2011-07-25T21:22:43.230

Reputation: 2 000

Thanks!! It's been days I've been trying to delete thoses files!! – billy – 2015-08-12T10:58:04.147

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 – 2018-10-19T09:36:13.743

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.

Dave

Posted 2011-07-25T21:22:43.230

Reputation: 63

Going to give that a try, I couldn't for the life of me remember what that was called. – Kara Marfia – 2011-10-29T18:27:14.753

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.

Tim Wright

Posted 2011-07-25T21:22:43.230

Reputation: 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.

Jahmic

Posted 2011-07-25T21:22:43.230

Reputation: 211

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

Саша Черных

Posted 2011-07-25T21:22:43.230

Reputation: 543

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

KCotreau

Posted 2011-07-25T21:22:43.230

Reputation: 24 985

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 – 2011-07-26T14:13:38.707

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 – 2011-07-26T14:18:01.663

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 – 2011-07-27T18:16:26.557

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 – 2011-07-27T18:26:09.820

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 – 2011-07-28T17:19:32.027

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.

LawrenceC

Posted 2011-07-25T21:22:43.230

Reputation: 63 487

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 – 2011-07-26T14:11:56.413

-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

user3124235

Posted 2011-07-25T21:22:43.230

Reputation: 1

2For the benefit of OP and other readers, can you edit your answer to say what these commands do? :) – bertieb – 2018-08-20T15:27:09.103

ok no problem but why -1 for my answer :/ . – user3124235 – 2018-08-20T16:16:22.483

I didn't -1 / downvote so I cannot answer that, sorry – bertieb – 2018-08-21T16:17:19.267

-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.

Rivet

Posted 2011-07-25T21:22:43.230

Reputation: 1

I highly doubt this is a permissions issue. – bwDraco – 2014-11-24T03:14:08.160