Windows 7: Can't access or delete folder although logged in as administrator

I have some folder: C:\program files (x86)\myApplication\myFolder

I uninstalled the application, but myFolder is still there. If I try to open it, I get an 'Access denied'.

If I try to delete it I get the message that I need to acquire Admin rights to proceed. If I click the respective button, I still get a message that I don't have the necessary rights to do it.

If I click on properties of the folder it takes quite some time until the properties window opens (around 10 seconds). It's 0 bytes. If I go to 'security' and check the owner of the folder, it tells me that the current owner of the folder cannot be displayed. If I try to change the owner to myself it tells me that the new owner cannot be setup - access denied.

Can anyone tell me how I can get rid of that folder?


Solution 1:

I feel like I answered this more than once but I can never find it when the dupes show up. Anyway what you are looking for is this command:

Net user administrator /active:yes

Enter this into an elevated cmd window (right click, run as administrator), log off then log in as the administrator account. Make sure you disable it by setting active:no when you are done, this account is not for day to day use and bypasses UAC.

Solution 2:

Are you logged as a local administrator in the first place? If not, that is your answer...you do not have the rights. If you are, then take ownership of it with this command:

TAKEOWN /F directory /R /A

This will take ownership and give permissions to the administrator.

Solution 3:

It may be locked by an application. Try deleting it from Safe Mode.

Solution 4:

The main reason behind this is that the explorer.exe process locks files that are in use, effectively preventing you from deleting them. Usually, these files should not be touched, but sometimes, situations arise when you really need to erase some troublesome ones.

Fortunately, there are a few easy solutions to delete those files.

Solution #1: Kill explorer.exe
Solution #2: Use The Windows Recovery Console
Solution #3: Use unlocker

More details and reference:

http://www.techproceed.com/2014/05/how-to-delete-undeletable-or-locked-file.html