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

猜您喜欢...

  1. Algorithm Interview: Maximum Path Sum in Binary Tree
  2. Reverse a Linked List
  3. Linode Support Ticket 10029540 - Other - Important Notice Regarding Ubuntu 17.10 Image
  4. Daily Interview Question: Find Cycles in a Graph
  5. Consecutive Ones
  6. 56 Bytes
  7. Daily Interview Problem: Product of Array Except Self
  8. Daily Interview Question: Longest Sequence with Two Unique Numbers
  9. Find Missing Numbers in an Array
  10. Daily Interview Question: Create a Simple Calculator

评论 (0)

    当前页暂时没有评论。


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