Jump to content

Recommended Posts


fist, great thanks for this super tools which is autoit !

ProcessList can extract le PID and the Name of process,

but i would like to extract the time CPU and memory of process running

; List just NTbackup.exe processes
$list = ProcessList("ntbackup.exe")
for $i = 1 to $list[0][0]
  msgbox(0, $list[$i][0], $list[$i][1])

have a idea ?

thanks a lot.


Link to post
Share on other sites


i've tried pslist.exe.

one time it works good, next time not, next good, next not .....dont know why ... :):D:D:huh:

a part of scripts :

echo Liste des Process actifs>> %ROOTAIL%\%COMPUTERNAME%
start /wait %ROOTAIL%\OUTILS\pslist.exe>>%ROOTAIL%\%COMPUTERNAME%


Link to post
Share on other sites


try with this script :

include <file.au3>
#include <array.au3>
dim $process[4]; process will contain the name proceess, the pid, the cpu time and memory
    runwait(@comspec&' /c pslist | find "  " | find ":" | sort > '&$tmp1,"",@SW_HIDE)
    runwait(@comspec&' /c pslist -m | find "  " | find /V "Priv Pk" | sort > '&$tmp2,"",@SW_HIDE)
    if $fic1=-1 or $fic2=-1 Then
        MsgBox(16,"files can not be read",1)
        return -1
Until $nbproc=$nbproc2 ; sometimes 1 process is closed or is launched between 2 call of pslist
DIM $ArrayProc[$nbproc]; big array which contains all array of type $process
for $cpt=0 to $nbproc-1
    $line1=StringSplit($line1," ",1)
    $line2=StringSplit($line2," ",1)
    $process[2]=$line1[7];cpu time
For $cpt=0 to $nbproc-1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...