Re: Get Windows Task-Names?!

From: Purl Gurl (purlgurl_at_purlgurl.net)
Date: 11/02/03


Date: Sat, 01 Nov 2003 19:24:58 -0800

Kasper Dziurdz wrote:
 
> Purl Gurl wrote:

(snipped)

> > Kasper, your use of tasklist has rattled my memory
> > of tlist which will be added to my Perl site as an
> > effective method to list all running processes
> > using Win32 DOS system access.
 
> Here is the complete code I wrote:
 

I would like to read a sample of your raw output from tasklist.
Your code suggests WinXP tasklist returns are quite different
than traditional tlist returns:

-1076805 KERNEL32.DLL
-12189 MSGSRV32.EXE work window name HighCriteria TotalRecorder Mrqx1FQGyj4c1kycrB
-15405 MPREXE.EXE
-252601 VSMON.EXE OleMainThreadWndName
-244229 mmtask.tsk
-185801 EXPLORER.EXE Program Manager
-134805 SYSTRAY.EXE Power Meter
-1952597 ZONEALARM.EXE ZoneAlarm
-134561 WMIEXE.EXE
-2054857 DDHELP.EXE DDHelpWndClass
-1856473 NETSCAPE.EXE NSPR:EventReceiver
-168661 WINOA386.MOD
-1686185 TLIST.EXE TLIST

As you can see some returns will not have a window title
being background support services, and some returns provide
a window name quite different from the actual program name
and different from the actual window name.

It is of interest Explorer returns a classic Win3.x
"Program Manager" name. System Tray is labeled as
"Power Meter" although this meter is not running.
Zone Alarm and Tlist are the only true correct
returns for this sample.

Most of the programs listed at the Microsoft ftp site
are not included on OEM CD installation disks. I have
downloaded all and am researching what they do.

Also of interest, a question which appears here infrequently
is how to kill a process under Win32. This kill.exe listed
at that ftp site is specifically designed for killing off
Windows tasks via DOS, which is highly adaptable to Perl.
Usual caution would apply of a process no longer running
when a kill pid command is executed, or a new process
is running under a previously used pid number.

Clearly many of these programs not available on OEM disks
will make for superior replacements for Perl modules which
often do not perform as claimed.

Purl Gurl

-- 
Purl Gurl Net, Delivering Rock N Roll And Fun
At Two Megabits Per Second
http://www.purlgurl.net/


Relevant Pages

  • Re: ping Purl Gurl? Beginner Level Perl
    ... will work with perl core. ... Is this a term known in the Windows world? ... Randal and Purl Gurl Net. ... My guess is Windows' command shell, ...
    (alt.usage.english)
  • Re: PATCH [0/3]: Simplify the kernel build by removing perl.
    ... merge window is closing soon I could resubmit the other two with Sam's ... - add the updated timeconst patch to kbuild-next ... I just rewrote the perl script and changed the call. ...
    (Linux-Kernel)
  • Re: How to transparently download multiple files?
    ... except for hints and direction from Purl Gurl that led to both ... and to my better understanding of Perl. ... All that said, I find your recent posts to be helpful to myself and others, ...
    (comp.lang.perl.misc)
  • Windows: stop automatic closing of the terminal
    ... I had longstanding problems with Activestate Perl under Windows XP ... which closed the terminal window too early. ... the terminal window is closed almost ... I thought I should add something which prompts for a keystroke at the ...
    (perl.beginners)
  • Re: distributing perl applications
    ... And Perl doesn't ... > there is no pause at compilation. ... I think bytecode does that but I may ... elimination of the "ugly black window". ...
    (comp.lang.perl.misc)