页面顶部 Top
文件:  root - diary - 2008 - 2008-12 - 2008-12-2_07.36AM.html
标签: 计算机, Computing Tips, | 英文 | 主页 | 类别: 计算机科学 | 24377 次阅读, 46004 次搜索 | 245 个单词

定阅此目录的博客 | 浏览 | 博客存档

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

标签: 计算机, Computing Tips, | 英文 | 主页 | 类别: 计算机科学 | 24377 次阅读, 46004 次搜索 | 245 个单词 定阅此目录的博客

猜您喜欢...

  1. [Daily Problem] Validate Balanced Parentheses
  2. Daily Interview Problem: Merge K Sorted Linked Lists
  3. Sorting a list with 3 unique numbers
  4. CVE-2015-8874 - cPanel EasyApache Vulnerabilities
  5. Daily Interview Problem:Create a balanced binary search tree
  6. CPU Utilization
  7. Skip the readings, focus on problems. And use all the hints!
  8. Patterns for breaking down questions you haven
  9. Kaprekar
  10. Design Tic-Tac-Toe

评论 (0)

    当前页暂时没有评论。


最后更新: October 30 2020 14:21:12 | RSS Subscription
牛排怎么做才好吃? | <meta name="机器人" content="索引, 跟踪">