Few days ago I was scanning a memory card with Avast and PC got shut down. Now there is file of 4GB in C:\ProgramData\AVAST Software\Avast and I need permission from SYSTEM to delete it. I tried to take permission from administrator account but didnt work. What should I do to delete this file?

Recommended Answers

All 9 Replies

Run the command shell (cmd.exe) as Administrator then delete the file from there.

You might need to take ownership of the file before you can delete it. Log in to a command prompt as administrator and type takeown /? to get more help.

If the OS got shutdown during a critical I/O operation to the memory card, it could have creamed something in the File System Tables on the card. This can make removal of the file very difficult. Windows can be really porky about this. If neither of the previous suggestions help, you may need to copy all the readable data to another media and then reformat the memory card. However, if you know someone with a different OS (or have access to a computer running a different OS), try deleting the file on a different OS (eg, linux, unix, Mac, sun, etc), but you should still save whatever you can on a different media first. I believe there are also several "Repair" programs out there, but they may not work anyway and on Windows, they will cost you. If you're not losing anything you care about, a reformat is usually the best/easiest solution.

Tried TAKEOWN with administrator account but didnt work. Getting error: access denied. Maybe because file owner is SYSTEM. Any other solution?

If you know what you are doing, then open a cmd window as System and run delete file from there. So, in a admin cmd window, enter:
at 12:34 /interactive cmd.exe
where 12:34 is, say, one minute ahead of your current time.

Taking ownership of a file owned by SYSTEM isn't normally a problem. Perhaps something is holding the file open? Have you tried booting into safe mode and attempting to take ownership?

If you succeed I expect you'll then need to assign some permissions, to allow you to delete the file, otherwise you would see an access denied error.

Did Gerbil's suggestion work out?

@LaxLoafer ya tried gerbii's suggestion but was getting error and finally worked in safe mode, Thanks.

Safe Mode always works ;)

Personally, I think they should rename it as "Not-so-safe Mode"! :-) That is a good way to fubar your system... Hopefully you verified that this is not a file critical to other system functions?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.