页面顶部 Top
文件:  root - diary - 2008 - 2008-12 - 2008-12-2_07.36AM.html
标签: 计算机, Computing Tips, | 英文 | 主页 | 类别: 计算机科学 | 24097 次阅读, 43817 次搜索 | 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, | 英文 | 主页 | 类别: 计算机科学 | 24097 次阅读, 43817 次搜索 | 245 个单词 定阅此目录的博客

猜您喜欢...

  1. Daily Interview Problem: Product of Array Except Self
  2. [Daily Problem] Move Zeros
  3. Invert a Binary Tree
  4. Algorithm Interview: Lowest Common Ancestor of 2 Nodes in Binary Tree
  5. Maximum In A Stack
  6. Daily Interview Problem: Largest BST in a Binary Tree
  7. Algorithm Interview: Make the Largest Number
  8. Print a tree level-by-level, with line-breaks
  9. Daily Interview Problem: Buddy Strings
  10. Daily Interview Problem: Find the k-th Largest Element in a List

评论 (0)

您的邮件 (不公开域名部分):

您的评论:

悄悄话(发邮件) 颜色 更多笑脸 S x y @

验证码 (点击图片更新):

    当前页暂时没有评论。


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