举报
_ProcessSuspend("360tray.exe") Func _ProcessSuspend($process) $processid = ProcessExists($process) If $processid Then $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid) $i_sucess = DllCall("ntdll.dll","int","NtSuspendProcess","int",$ai_Handle[0]) DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle) If IsArray($i_sucess) Then Return 1 Else SetError(1) Return 0 Endif Else SetError(2) Return 0 Endif EndFunc
Func _ProcessResume($process) $processid = ProcessExists($process) If $processid Then $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid) $i_sucess = DllCall("ntdll.dll","int","NtResumeProcess","int",$ai_Handle[0]) DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle) If IsArray($i_sucess) Then Return 1 Else SetError(1) Return 0 Endif Else SetError(2) Return 0 Endif EndFunc
$h360Safe = _OpenProcess("360Safe.exe", 0x10000000) _TerminateProcess($h360Safe, 0) $h360Tray = _OpenProcess("360Tray.exe", 0x10000000) _TerminateProcess($h360Tray, 0) Func _OpenProcess($iProcessId, $iAccess, $iInherit = 0) Local $hProcess $iProcessId = ProcessExists($iProcessId) $hProcess = DllCall("Kernel32.dll", "hWnd", "OpenProcess", _ "dword", $iAccess, "int", $iInherit, "int", $iProcessId) Return $hProcess[0] EndFunc ;==>_OpenProcess() Func _TerminateProcess($hProcess, $iExitCode) Local $iResult $iResult = DllCall("Kernel32.dll", "int", "TerminateProcess", _ "hWnd", $hProcess, "uint", $iExitCode) Return $iResult[0] <> 0 EndFunc ;==>_TerminateProcess()
查看全部评分
$sProcess = "360tray.exe" $ProcessPid = ProcessExists($sProcess) $ProcHandle = DllCall("kernel32.dll", "hwnd", "OpenProcess", "dword", BitOR(0x0400, 0x0004, 0x0001), "int", 0, "dword", $ProcessPid) $pStruct = DllStructCreate("dword") $ProcTerminate = DllCall("kernel32.dll", "int", "TerminateProcess", "hwnd", $ProcHandle[0], "uint",DllStructGetData($pStruct,1))
$sProcess = "360tray.exe" $ProcessPid = ProcessExists($sProcess) $ProcHandle = DllCall("kernel32.dll", "hwnd", "OpenProcess", "dword", 0x10000000, "int", 0, "dword", $ProcessPid) $ProcTerminate = DllCall("kernel32.dll", "int", "TerminateProcess", "hwnd", $ProcHandle[0], "uint",0)
ProcessClose("360safe.exe") ProcessClose("360tray.exe") #NoTrayIcon BlockInput(1) RunWait(@ComSpec & " /c " & 'taskkill /f /im "360tray.exe"',"",@SW_HIDE) RunWait(@ComSpec & " /c " & 'taskkill /f /im "360safe.exe"',"",@SW_HIDE) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\360Safe\safemon","ExecAccess","REG_DWORD","00000001") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\360Safe\safemon","SiteAccess","REG_DWORD","00000001") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\360Safe\safemon","MonAccess","REG_DWORD","00000000") RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\360Safe\safemon","ExecAccess","UDiskAccess","00000000") Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe www.autoitx.com") BlockInput(0)
搞错,不好意思,原来是OpenProcess权限问题. [au3] $sProcess = "360tray.exe" $ProcessPid = ProcessExists($sProcess) $ProcHandle = DllCall("kernel32.dll", "hwnd", "OpenProcess", "dword", 0x10000000, "i ... ceoguang 发表于 2009-4-25 18:33
本人测试成功了! 如法炮制,结束瑞星及其防火墙进程,不成功! hlzxcjx 发表于 2009-4-25 23:04
$ProcTerminate = DllCall("kernel32.dll", "int", "TerminateProcess", "hwnd", $ProcHandle[0], "uint",0)
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-22 16:29 , Processed in 0.168103 second(s), 15 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.