View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Thyag Thyag is offline
external usenet poster
 
Posts: 39
Default List all applications running

On Sep 17, 11:08*am, Bob Bridges
wrote:
Well, I've read about some ways that I think would do what you want. *I think
Excel would take up more machine resources than you need to spend, both RAM
and CPU attention. *I suggest you pose this question on the VBScript forum; a
VB script (a VB-like program that you write and save as plain text) would
probably be able to do everything VBA/Excel could do, with only a little more
difficulty in programming and a lot less strain on the machine. *Better than
either, perhaps, there are probably programs out there that'll do the job
without you having to write a program for yourself.

VBA or VBScript, though, the techniques would probably be similar. *I just
ran across a method of getting Windows to return to your program a collection
of all running apps, which your code can then go through and pick out what it
wants. *Let's see whether I can find out where I saw it....

....Well, here's a Microsoft explanation of "How To Get a Window Handle
Without Specifying an Exact Title":http://support.microsoft.com/default...b;en-us;147659. *It says here
that once you have the Windows subroutines defined correctly, this statement:

r = FindWindowLike(hWnds(), 0, "*", "*", Null)

...returns all the available windows. *There's lots of sample code there.

Note that "all the available windows" isn't usually the same as "all the
applications that are running". *Some applications run more than one window,
and I wouldn't be surprised if some apps don't appear in any window at all at
least part of the time. *And if you really meant to include processes as well
as applications, the above would probably get you only a very small fraction
of what's on your machine. *I'm not very knowledgeable in that area, being
new to this myself.

--- "Thyag" wrote:
Can anybody help to get the below output in an excel file -
1 - List of all the applications are running from the time system is
logged in and logged off.
2 - The duration of each application running from the time system is
logged in and logged off.


I really thank for your reply & guidence.

I'll try the VBScript Groups.

Thanks again,
Thyagaraj