-2

I need to delete Program Files (x86) folder.

I can't delete it because some dll files cannot be deleted. One of the first of them is "common/.../dao360.dll"

I am following this tutorial: http://www.001easytricks.com/2012/06/delete-program-files-x86-from-windows-7.html


I've tried to change ownership to my Admin user using:

takeown /f "C:\Program Files (x86)" /r /d n

This change was successful.

After this I executed:

icacls "C:\Program Files (x86)" /grant administrators:F /t

with no success.


I've also tried to give permission to my user from the GUI successfully.

But I still cannot delete the folder.

So how how do I do that? Is it possible to delete that folder with the DLL files in it after I've logged in?

8
  • 10
    Why do you need to delete this folder in the first place? What possible gain could there be from doing so? This is like saying, "How can I remove the chassis from my car?". Aug 5, 2013 at 18:20
  • 1
    That folder is where all non-64bit compatible and "legacy" applications are installed... If you delete it you're going to have problems eventually.
    – Taegost
    Aug 5, 2013 at 18:23
  • 3
    This is what I would consider a phenomenally bad idea.
    – EBGreen
    Aug 5, 2013 at 18:24
  • 1
    To make it avaliable from another encrypted drive using symlink
    – Vyacheslav
    Aug 5, 2013 at 18:24
  • 2
    This seems appropriate here: meta.stackexchange.com/q/66377/190618
    – Excellll
    Aug 5, 2013 at 20:55

5 Answers 5

2

Not exactly sure why you want to do this, but you can use Unlocker to delete the folder. It will fail because the files are in use, but will give you the option to delete it on next login where it will remove the folder before anything has a chance to access it.

1
  • I have had good results with that program although I am also totally stumped by the reasoning behind deleting the program files directory.
    – djangofan
    Aug 5, 2013 at 20:14
2

Why do you need to delete this folder in the first place? What possible gain could there be from doing so? This is like saying, "How can I remove the chassis from my car?". – somequixotic

To make it avaliable from another encrypted drive using symlink – Vyacheslav

Actually, you cannot move the Program Files folder on Windows. While that specific post talks about Program Files and you are talking about Program Files (x86), I imagine that the same principle applies in both cases.

So, sorry, I don't think what you want to do is supported in Windows. You might be able to wedge it into working, for some definition of "working", but you're likely to hit some edge case somewhere, likely at a most inopportunate time (like during a major system update).

2
  • 1
    You can move it the sense it's a symbolic link I have done it with a RamDisk and a single directory within that directory furthermore the author said exactly that
    – Ramhound
    Aug 5, 2013 at 20:13
  • @Ramhound I'm not saying it can't be made to mostly work; in fact, I do say just that. But it's an unsupported configuration and I wouldn't trust it to work in every conceivable (even realistic) scenario. Chen mentions (see the linked article) that updates are done within file system transactions; just to take one example, what if there's a power loss during an update that touches files inside a moved Program Files (x86) directory? Would the file system contents then be consistent as designed and tested? Perhaps, but seems unlikely.
    – user
    Aug 5, 2013 at 20:19
1

Create a new folder in a drive called Windows.old
Move the Program files folder to it.
Open disk cleanup...(u can just type it in the start search bar)
And select the drive in which your Windows.old file is placed...
It will start scanning.
After that check the box corresponding to old windows files and thereby you'll end up deleting the Program files folder.

0

Just mount the volume read-write on another operating system that can read and write NTFS (for example, Linux's ntfs-3g, or another Windows computer), then delete the directory. Done.

You do not need a second computer to do this, or move any hardware. You can boot a Linux distribution, such as Ubuntu, using either a USB thumb drive or a CD/DVD. This should have the requisite software to delete absolutely anything that's on your Windows hard drive. I'm not saying it's a good idea to do so, but this is technically how you would do it.

9
  • The thing is dlls needed to windows to successfully load and for login. After that I need to substitute it with symlink to another drive. The final goal is to make Program Files available from another drive by symlink.
    – Vyacheslav
    Aug 5, 2013 at 18:22
  • OK. Well you can still delete your Program Files folder if you mount the drive on Linux or another copy of Windows. Aug 5, 2013 at 18:26
  • edited question header and body
    – Vyacheslav
    Aug 5, 2013 at 18:27
  • dll needs to be loaded from folder first
    – Vyacheslav
    Aug 5, 2013 at 18:31
  • @Vyacheslav If you have loaded DLLs from that folder, you cannot delete it. Aug 5, 2013 at 18:33
0

I'm not sure what you're hoping to achieve by doing this. However, there's a freeware program called Unlocker, which might be able to help. It's designed specifically to delete files that (the OS thinks) are in use.

PS: Because it's designed for Windows, There's no need to reboot into a Linux environment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .