To the Top
File:  root - diary - 2008 - 2008-12 - 2008-12-2_07.36AM.html
Tags: 计算机, Computing Tips, | English | Home Page | Category: Computing | 24098 Views, 43829 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 | 24098 Views, 43829 Search Bots | 245 Words Subscribe to Feed Burner

Related Articles

  1. [Daily Problem] Remove Consecutive Nodes that Sum to 0
  2. Algorithm Interview: Permutations of numbers
  3. Algorithm Interview: Determine If Linked List is Palindrome
  4. Delphi Dynamic Array
  5. Daily Interview Problem: Min Range Needed to Sort
  6. [Daily Problem] Move Zeros
  7. [Daily Problem] Add two numbers as a linked list
  8. Progess made
  9. Daily Interview Problem: Room scheduling
  10. Algorithm Interview: Longest Consecutive Sequence

Comments (0)

    Be the first one to comment this page !


Page Edited: October 30 2020 14:21:09 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">