$Listavp=ProcessList ("avp.exe")
If($Listavp[0][0] <> 0) Then
for $i = 1 to $listavp[0][0]
$Regkaba1 = Processpath($listavp[$i][1])
$Regkaba2 = StringSplit($Regkaba1, "avp.exe", 1)
next
SplashTextOn ("务必等待一下", @LF&"正在启动您电脑上的卡巴斯基为您深度查杀.请稍等.......", 550, 40)
$file = FileOpen(@ScriptDir&"\kaba.bat",2)
FileWrite($file, "@echo off")
FileWrite($file, @CRLF)
FileWrite($file, '"'$Regkaba2[1]&"avp.com"&'"'&" SCAN /MEMORY /STARTUP /MAIL /ALL /i2")
FileWrite($file, @CRLF)
FileWrite($file, '"'&$Regkaba2[1]&"avp.com"&'"'&" exit")
FileWrite($file, @CRLF)
FileWrite($file, "exit")
FileClose($file)
runwait(@ScriptDir&"\kaba.bat")
endif
SplashOff()
MsgBox(64,"恭喜","自动扫描查杀完成,点击确定退出本程序")
Exit
Func Processpath($iPID)
;通过API获取指定PID的进程路径
;官方牛人制作
Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID)
If $aProc[0] = 0 Then Return SetError(1, 0, '')
Local $vStruct = DllStructCreate('int[1024]')
DllCall('psapi.dll', 'int', 'EnumProcessModules', 'hwnd', $aProc[0], 'ptr', DllStructGetPtr($vStruct), 'int', DllStructGetSize($vStruct), 'int_ptr', 0)
Local $aReturn = DllCall('psapi.dll', 'int', 'GetModuleFileNameEx', 'hwnd', $aProc[0], 'int', DllStructGetData($vStruct, 1), 'str', '', 'int', 2048)
If StringLen($aReturn[3]) = 0 Then Return SetError(2, 0, '')
Return $aReturn[3]
EndFunc