To the Top
File:  root - diary - 2008 - 2008-12 - 2008-12-2_07.36AM.html
Tags: 计算机, Computing Tips, | English | Home Page | Category: Computing | 24158 Views, 44237 Search Bots | 245 Words

Subscribe to Feed Burner | Browse | Archive

A startup script to enable autorun.inf virus protection
Some virus create autorun.inf file to enable automatic file execution when you browse the folder,, which is very annoying... you can create a folder with the same name and in this case the virus would have trouble to write to that file. "Autorun.inf" even can not be overwritten because it is a folder...
Put the script at the startup to make sure every drive has a hidden folder "autorun.inf"

@echo off
REM A Batch Script to Create Folder 'autorun.inf'
REM This can prevent autorun.inf virus.
REM Free to use, put at startup recommended.
REM by Zhihua Lai, 2 - Dec - 2008
for %%i in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do call :sub %%i
goto end
:sub
echo Checking %1: ...
if not exist %1:\nul goto notfound
if exist %1:\autorun.inf\nul goto already
if exist %1:\autorun.inf goto clean
goto done

:clean
echo Removing File %1:\autorun.inf ...
attrib -r -a -s -h %1:\autorun.inf
del %1:\autorun.inf
:done
echo Making Directory '%1:\autorun.inf' ...
mkdir %1:\autorun.inf
:already
echo Attributing Directory '%1:\autorun.inf' ...
attrib +r +a +s +h %1:\autorun.inf
goto end
:notfound
echo Skipping %1: ...
:end

Batch Script to Enable autorun.inf virus protection

Tags: 计算机, Computing Tips, | English | Home Page | Category: Computing | 24158 Views, 44237 Search Bots | 245 Words Subscribe to Feed Burner

Related Articles

  1. Daily Interview Problem: Merge List Of Number Into Ranges
  2. New Vulnerabilities (CVE-2016-4581) have been detected in CentOS/RHEL/CloudLinux 7
  3. Algorithm Interview: Convert Roman Numerals to Decimal
  4. Daily Interview Question: Word Search
  5. Daily Interview Problem: Room scheduling
  6. Algorithm Interview: Make the Largest Number
  7. Compare Version Numbers
  8. Daily Interview Problem: Given two arrays, write a function to compute their intersection.
  9. Daily Interview Problem: Circle of Chained Words
  10. Daily Interview Problem: Reverse Integer

Comments (0)

Your Email (Domain Part Not Exposed):

Your Comments:

Privately By Mail Colors More Smileys S x y @

Verification (Click Image 2 Refresh):

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">