Link to home
Start Free TrialLog in
Avatar of RanjiniPraba
RanjiniPraba

asked on

Time /Duration of an application

hi,
it is possible to get the names of the applications that are running in the system. is it possible to get the duration of these applications, i.e the time for which it is running.
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Please maintain this open question:
Compact database Date: 01/28/2002 05:07AM PST  
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20260252

Experts spent their valuable time helping you out (for I may add, 15 points), now it is time to do your part.

Anthony
Take a look here for all tasks:

http://www.thescarms.com/vbasic/RunningProcs.asp

D'Mzzl!
RoverM
roverm, still alive?
Yeppers! Cool huh?
But far too much time too little....
Avatar of RanjiniPraba
RanjiniPraba

ASKER

hi roverm,
sorry,your solution doesnt work. it only gives the names of the processes, but not its duration.
thanks.
Yes, but maybe you can go from there.
If you want to monitor just one (or more) application(s), first set a base, then monitor the tasklist
every minute orso.

D'Mzzl!
RoverM
Any progress here ?
did nor help Mr. roverm. sorry
So, you still need another solution ?
Or did you solve it otherwise ?
I was thinking in a "possible" solution, but it would only works for excutables (com,exe,pif,bat).
What's the status here ?
Hello ?
Hi roverm, back in town?
Yeppers! Never left actually....
Just way too much time too little...
RanjiniPraba: Any progress here ?
Do you still need some help ?
Is your problem solved ? If so: How ?

D'Mzzl!
RoverM
mmm... zzzzzzzzzz.....
hi all, your solution didnot help me. but i myself found a solution.
it is like, i enumerate through all the process, now what i do is i obtain the process id through the window handle property. then pass this process id to openProcess api to get a handle to the process, then, i pass this handle to the api getprocesstimes with the hProcess, and for empty file time structures. in which there is creation time variable with the filetime structure. i convert the file time structure to system time structure, thus obtaining the process creation times. then i subtract the creation time from the current time thus obtaining the duration.
anyway, thanks for your help.
thanks ee.
Great to see that your problem is solved!

In my opinion the best thing you can do is ask a moderator to PAQ this question and refund your question-points.
You can do this by posting a question in CS with an explanation and a link to this question.

D'Mzzl!
RoverM
RanjiniPraba, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
ASKER CERTIFIED SOLUTION
Avatar of SpideyMod
SpideyMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial