Delete the virus autorun. inf in DOS

Source: Internet
Author: User

Today, a classmate has a virus in his computer, but there are many important things in the computer, such as virus-style Autorun. INF is a stubborn old virus. As long as the deletion is not clean, it will immediately copy and implant everything in the computer into such a file, which is usually in the root directory, when each drive disk is opened, the virus runs automatically, and is added to each drive disk. Then, the virus gradually spreads to each folder, in this way, we will slowly destroy your system!

In the case of a system, the virus cannot be deleted. Even if it is deleted, it will be generated immediately. If the system is reinstalled, the virus in other disks will be infected with the c disk, the worst way is to format everything and delete everything, but there are a lot of important things in its computer that you don't want to delete.

Later I thought about how to delete the stubborn viruses from Dos, but after running dos, the viruses were invisible and hidden, probably after processing, in dos, It is a hidden file. After checking the network, you can see that you have run attrib Autorun. INF-s-h-R, and then it will show that attrib shows or changes the attributes of the file. Therefore, after you enter the command, the file will appear and then run Delete Autorun. INF, you can delete it, but there is another problem, it will be very troublesome to delete it, because there are too many such files in the computer hard disk, if one goes to find and then delete it, it will be very troublesome!

After that, I thought of the batch processing files. It would be much easier to write a batch processing file, let the system search for it by itself, and then delete the files, finally, find "for % A in (c d e f g) do for/F" delims = "% B in ('dir/A/B/S % A:/Autorun. INF ') Do attrib "% B"-s-h-R & del "% B" ", which is a loop statement for your C, D, E, F, g. Find and delete the subfolders one by one. If there are more drive letters, add them to the back and finally delete them. This is really amazing! You don't have to worry about this virus in the future!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.