只是输出非系统进程,如果结束掉有点危险,自己改。#include <Array.au3>
#include <LocalSecurityAuthority.au3>
$hToken = _OpenProcessToken(@AutoItPid)
Dim $aPrivilege[1][2] = [[$SE_DEBUG_NAME, 2]]
_AdjustTokenPrivileges($hToken, $aPrivilege)
_CloseHandle($hToken)
$aProcess = ProcessList()
Redim $aProcess[$aProcess[0][0] + 1][3]
For $i = $aProcess[0][0] to 1 Step - 1
$hProcess = _OpenProcess($aProcess[$i][1], $READ_CONTROL)
$sUser = _QueryKernelObjectSecurityOwner($hProcess)
_CloseHandle($hProcess)
If $sUser = "BUILTIN\Administrators" Then
_ArrayDelete($aProcess, $i)
Else
$aProcess[$i][2] = $sUser
EndIf
Next
_ArrayDisplay($aProcess, "Non-System Processes")
LocalSecurityAuthority.au3 -
http://www.autoitx.com/forum.php ... &extra=page%3D2 |