Access Denied — How to Delete Protected or Spyware Files

Contributor Icon Contributed by davak Date Icon November 26, 2004  
Tag Icon Tagged: Windows spyware

When trying to delete spyware files, users will often get errors. Here is how to overcome the spyware’s protection over these files.


I hate this error — Access Denied. Damn spyware has got the file locked… and now I’ve got to figure out how to unlock it. This is much more art than science but I’ll tell you how I typically walk through the program.

If you can’t even find the file that you need to delete, you might want to try this trick:
Find Files and Spyware that are Really Hidden

    1. Change your system so you can view and edit your hidden and system files:
    http://www.tech-recipes.com/rx/685/xp_2000_view_and_remove_hidden_files_and_folders

    2. Close all programs. Sometimes a currently running program will have locked the file. Typically this won’t work, but you’ll feel silly missing it.

    3. Boot to safe mode. Booting to safe mode will often disable spyware programs that might be holding access to the files in question. You might as well stay in safe mode for the rest of the process.

    4. Force stop unknown programs and processes. CTRL-ALT-DEL will bring up the task manager that will allow you to kill unknown programs and processes. If you can’t use the taskmanager, you can try some of the freeware replacements such as:
    http://www.sysinternals.com/ntw2k/freeware/procexp.shtml

    5. Sometimes it is just easier to delete the file in a dos box. To open a command box:

    - Click Start
    - Click Run
    - In the textbox type cmd.exe and click OK

    6. I’m not going to try to teach DOS here, but the command to delete a file is the following:
    del \folder\file.exe

    7. If you still can’t delete it, you can clear the attributes of the file. If you need details on this, you can read more about it here. The dos command for this is the following:
    attrib -r -s -h trojanfilename

    After doing this you will still need to delete the file with one of the methods described above.

    8. If none of the above work, you can use a specialized file deletion freeware program such as Move On Boot.

    9. Booting to a CD-ROM boot utility disk or linux disk is a painful, but almost foolproof, method of deleting files. Here’s that recipe:
    http://www.tech-recipes.com/rx/469/boot_cd_rom_run_diagnostic_tools
    Here’s how to remove infected files from the system restore area:
    http://www.tech-recipes.com/rx/8/clearing-infected-files-from-system-restore

    If you have any other hints please let us know.

Previous recipe | Next recipe |
 
  • Anonymous
    try unlocker. it adds itself to your context menu. unlocker:
    <ul id="quote"> Unlocker is a utility with a simply stated goal: make it easy to delete locked files. If you’ve ever been frustrated by one of these error messages, this free Windows utility might be the answer.

    * Cannot delete file: Access is denied
    * There has been a sharing violation
    * The source or destination file may be in use
    * The file is in use by another program or user
    * Make sure the disk is not full or write-protected and that the file is not currently in use

    </ul>
  • Anonymous
    Thank you! This helped me get rid of that crappy "WhenU.com" viral advertising file that was annoying me!
  • Anonymous
    thanks! you helped me defeat zlob and the verminiser!
  • Anonymous
    Hi you guys thanks a lot I have at last got rid of a pestilent file I have been trying to get rid of for ages the 'unlocker' helped me. The file wasn't spyware or dangerous but a bad download decision and couldn't remove it it was like a nasty stain that wouldn't move and showed up now and again. I picked this tip up of a tip made in this forum in Oct '05 and it still stands good :lol: :D
  • Wajiudin
    Can you give me some video for this problem please....i can't do it...
  • Brett Peterson
    I tried to download Move On Boot and Trend blocked it as a Trojan.
  • Quick note... using dos and the 'attrib -r -s -h trojanfilename' command didn't work but I did it again adding the -a switch and ... bye bye file!

    It was a frustrating morning trying to get rid of an infected 'inbox' file. Thanks for the kick in the head... I rarely even think about dos anymore! =)
  • Sheenu Mehra
    What can we do to open all sites. Like orkut and messengers are not open my pc. Here is some setting to denied the access of these sites.
  • Jeff P
    Thanks for the help. MoveOnBoot worked like a charm.
  • anonymoussy
    Thanks, helped me delete "Access Denied" files from the Vista folder that I coudn't delete after installing xp.
  • millwall
    i cannot even get pass my password .whenI enter my password it says access server denied,but on the same computer my husband can use his password and log on.Any sugghestions pleas???
blog comments powered by Disqus