Created
June 6, 2017 04:21
-
-
Save xcloudx01/64930edef9d2745e54c4f8d390ecc8b2 to your computer and use it in GitHub Desktop.
AHK - Dump list of all running processes + monitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Prerun | |
#singleinstance force | |
;Main | |
Loop | |
{ | |
GetRunningProcesses() | |
sleep,2000 | |
} | |
;Functions | |
GetRunningProcesses() | |
{ | |
for process in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process") | |
{ | |
ProcessName := process.Name | |
ProcessCommand := process.CommandLine | |
if (ProcessName = "System Idle Process" or ProcessName = "System" or ProcessName = "wininit.exe" or ProcessName = "winlogon.exe" or ProcessName = "lsass.exe" or ProcessName = "services.exe") ;Always ignore list. | |
continue | |
else | |
{ | |
IniWrite,%ProcessCommand%,ProcessLog.txt,KnownProcesses,%ProcessName% | |
} | |
} | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment