本帖最后由 afan 于 2009-7-31 14:20 编辑 $disk1 = DriveGetDrive("ALL")
For $i = 1 To $disk1[0]
$vardisk = DriveStatus($disk1[$i])
If $vardisk = 'READY' Then
If FileExists($disk1[$i] & "\autorun.inf") Then
FileSetAttrib($disk1[$i] & "\autorun.inf", "-RSh")
$exe = IniRead($disk1[$i] & "\autorun.inf", "AutoRun", "open", "1")
If $exe <> 1 Then FileSetAttrib($disk1[$i] & "" & $exe, "-RSh")
FileDelete($disk1[$i] & "" & $exe)
FileDelete($disk1[$i] & "\autorun.inf")
EndIf
$mianyiok = DirCreate($disk1[$i] & "\autorun.inf")
If($mianyiok = 1) Then
RunWait(@ComSpec & ' /c md ' & $disk1[$i] & '\autorun.inf\病毒免疫专用..\', '', @SW_HIDE)
FileSetAttrib($disk1[$i] & "\autorun.inf", "+SHR")
RunWait("cmd /c echo Y|cacls.exe " & $disk1[$i] & "\autorun.inf /P everyone:N", "", @SW_HIDE)
MsgBox(4096, "本机 硬盘 第" & $i & "个驱动器 ", "已成功对:" & $disk1[$i] & "进行了杀防 U 盘病毒的免疫", 1)
EndIf
EndIf
Next
|