This lisp may not meet the exact result you want but give it a try.
(load "TaskFind")
(TaskFind "Blender.exe")
Note: Task "Blender.exe" must match in case as listed in the Tasklist.
; TaskFind check for name of process that's running
; if found notepad opens created text file in current drawing folder
; Argument:
; img-nam = case sensitive process name to look for
; Example:
; (taskfind "NVDisplay.Container.exe")
; (taskfind "Registry")
; OP:
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/tasklist-command/td-p/13385903
(defun TaskFind (img-nam / fil fr exe txt)
(vl-load-com)
(setq fil (strcat (getvar 'dwgprefix) "MyTaskList.txt") ; save file to current dwg location
exe (strcat "Tasklist.exe | find \"" img-nam "\" > " fil)
txt (strcat "Notepad.exe " fil)
)
(if (findfile fil) ; chk if file exists
(vl-file-delete fil) ; delete file
)
(command "_Sh" exe) ; shell tasklist find process
(alert (strcat "Completed Find Process on:\n" img-nam)) ; forces pause to allow for text file to be created
(if (setq fr (open fil "r")) ; chk if txt file created
(progn
(if (read-line fr) ; chk if file is empty
(startapp txt) ; open with notepad
(progn
(vl-file-delete fil) ; delete file
(alert (strcat "Process " img-nam " Not Found."))
)
)
(close fr)
)
(alert "Failed to create Text File.")
) ; if
(princ)
)