Page 1 of 1 1
Topic Options
#85013 - 2002-01-30 11:15 PM List All windows on desktop
DEEJAYSEE Offline
Lurker

Registered: 2002-01-30
Posts: 4
Hey All, I have searched the all boards and not found an answer to this one.

I would like to list all active windows and read it into a string or array. I think the com object to do this is something like this:
r = FindWindowLike(hWnds(), 0, "*", "*", Null)

Could someone mock up a quick script that does this or get me started down the right path?
TIA

PS, I am using kix to launch some apps inside citrix and move around files and I need to know if a specific app is running or not so I think this is the best way to do that!

Top
#85014 - 2002-01-31 04:29 PM Re: List All windows on desktop
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
DEEJAYSEE,

Welcome to the board!

Have you thought about using this utility -
PSLIST?

If you have using UNIX or releated OS, it is similar to ps (Process List and display) and when used in conjunction with PSKILL it is like the UNIX kill (kill a process) Program. That is you can kill processes by ID..

When you talk about hWnds for example, are you trying to write something in VB? Are you trying to determine not only if a task is active, but what the Window position is?

Thanks!

- Kent

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#85015 - 2002-01-31 04:39 PM Re: List All windows on desktop
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
kdyer, what's the difference between pskill and kill found in reskit?
_________________________
!

download KiXnet

Top
#85016 - 2002-01-31 04:46 PM Re: List All windows on desktop
DEEJAYSEE Offline
Lurker

Registered: 2002-01-30
Posts: 4
I tried Pslist at your suggestion and on a citrix server it lists processes for all users. I need to know if a process is running for a specific user. Thanks for the suggestion.

To Answer you second question, No I am not trying to write it in vb. I just researched the call on msdn and I would like to try to use it in a kix script with com/ole (Kix I know, VB I don't know).

Top
#85017 - 2002-01-31 05:05 PM Re: List All windows on desktop
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
easiest way, is to manually start the program and see what named windows are open.
then in the test script use these and try activate these. if succesfull they are open.

but what comes to kill, you may want to try the one in the reskit: http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/winntas/reskit/reskit.asp
and there is some util, don't remember the name anymore for current users process listing.

cheers,

_________________________
!

download KiXnet

Top
#85018 - 2002-01-31 05:47 PM Re: List All windows on desktop
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
quote:

DEEJAYSEE

I tried Pslist at your suggestion and on a citrix server it lists processes for all users. I need to know if a process is running for a specific user. Thanks for the suggestion.
To Answer you second question, No I am not trying to write it in vb. I just researched the call on msdn and I would like to try to use it in a kix script with com/ole (Kix I know, VB I don't know).


when you run pslist and it lists all fo the processes, does it show a userid along with the process? If so pipe "|" the command through a find string.

pslist | find /i "username"

Bryce

Top
#85019 - 2002-01-31 06:15 PM Re: List All windows on desktop
DEEJAYSEE Offline
Lurker

Registered: 2002-01-30
Posts: 4
Lonkero, Are you saying use the setfocus kix command? IF so I can't go down that road because it could freak the users out if another app suddently gets focus...

Bryce, Unfortunately it does not show which user the process is running under, Thanks for the attempt..

Top
#85020 - 2002-01-31 06:31 PM Re: List All windows on desktop
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Try PULIST from the ResKit. It lists the user, so pipe to find and you're good to go.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#85021 - 2002-01-31 06:32 PM Re: List All windows on desktop
DEEJAYSEE Offline
Lurker

Registered: 2002-01-30
Posts: 4
Got it!

There is a command called query in citrix which gives me a specfic users processes...
Thanks a bunch guys for pointing me in the right direction

Top
#85022 - 2002-01-31 08:46 PM Re: List All windows on desktop
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Lonkero,

The PS Tools are just enhanced versions of what is in the Resource Kit.

Thanks!

- Kent

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2312 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.064 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org