"Access Denied" Error: How to Remove Protected Spyware Files

Have you ever attempted to delete a file and you get an "Access Denied" error?

This problem usually happens when there's spyware on the computer. Spyware prevents you from deleting certain files.

Why are you deleting a certain file in the first place?

Is it a file that you no longer need or is it a spyware file that you must delete in order to remove a rogue anti-spyware program or a Trojan infection? Either way, there are a few ways you can go about deleting a protected file or spyware file from your computer. Follow the steps below to remove or delete protected files or spyware files that may have an "Access Denied error".

  1. Make your "hidden and system files" viewable.
    a. Open My Computer.
    b. Go to the Tools menu.
    c. Go to Folder Options…
    d. Click the View tab.
    e. Click Hidden files and folders.
    f. Make sure the radio button for Show hidden files and folders is selected.
    g. Uncheck Hide protected operating system files (Recommended).
    h. Click OK to exit out.
  2. Close any running programs that you may have open such as Internet Explorer or Firefox. In some cases a file cannot be deleted when a program has it open or is utilizing the file.
  3. Reboot your computer into safe mode. (How to boot in safe mode.)
  4. Stop the running process of the file you are attempting to delete. This insures that the file you are trying to delete is not loaded into memory so it may be deleted. (How to stop a running process)
  5. Attempt to delete the file. If the file will not delete or give you an "Access Denied error" you can proceed to step 6.
  6. Delete the file using Command Prompt via DOS.
    a. Open the Command Prompt program or click Start > Run and type in cmd.exe and click OK.
    b. Enter the following del \folder\spywarefile.exe where "folder" is the folder were your file is located that you wish to delete. "spywarefile.exe" is the name of the file that you wish to delete.

  7. If step 6 does not allow you to delete the specified file then you can clear the attributes of the file. Enter the follow DOS command attrib -r -s -h spywarefile.exe. "spywarefile.exe" is the name of the file that you wish to delete.

If you still cannot delete a particular file you may read "How to Delete Undeletable Files or Folders" or utilize various programs available on the internet such as "MoveOnBoot". The MoveOnBoot program allows you to move, copy or delete files before Windows locks or alters the file.

Disclaimer: This article is for educational purposes. By using this information you agree to be bound by the disclaimer. There's no guarantee that you will be able to remove a protected file from your computer by following the instructions above. Seek professional help if your computer continues to experience problems in deleting protected files.

Tags: .
  • JoshuaReen

    I like this way. This trick is good for users who love to play with technical ways. However, I have used “Long Path Tool” software in this situation and it helped me easily and quickly. So this tool is best for those members who don't love to play with technical skills.