From: pfay AT acl DOT lanl DOT gov (Patrick J. Fay) Subject: Re: Alive processes, tlist (tasklist) and kill 3 Oct 1998 18:29:42 -0700 Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: ianc AT kiwiplan DOT co DOT nz Cc: gnu-win32 AT cygnus DOT com Hello Ian, Sergey has a 'ps' command on his webpage. My version of it seems to dump core and I have a another alternative: One way to get the basic equivalent of unix's 'ps' output is to use the 'tlist.exe' from Microsoft's SDK. I think Microsoft calls this the Internet Resource Kit which you can get from: http://www.microsoft.com/ntworkstation/default.asp then Downloads (left hand side bar) Then scroll down to Internet Resources for Windows NT This is pretty huge for just the tlist.exe (which you will have to build, probably with a MS C compiler (or mingw32?). The source is simple (in dir /your_install_dir/samples/sdktools/tlist) and displays: C:\>tlist -2 Idle.exe 2 System.exe 20 smss.exe 30 csrss.exe 34 WINLOGON.exe 128 mgactrl.exe MGACtrl 132 mstask.exe SYSTEM AGENT COM WINDOW 102 NDDEAGNT.exe NetDDE Agent 169 explorer.exe Program Manager 173 mdm.exe OleMainThreadWndName 179 systray.exe Battery Meter 181 mgaqdesk.exe MGA QuickDesk 188 pwstray.exe OleMainThreadWndName 190 REMINDER.exe OleMainThreadWndName 192 MSOFFICE.exe Microsoft Office Shortcut Bar etc. You can grep this list for the tasks you are looking for. The same directory has a 'kill' program: C:\ms_sdk\samples\sdktools\tlist>.\kill /? Microsoft (R) Windows (TM) KILL Copyright (C) 1994-1996 Microsoft Corp. All rights reserved usage: KILL [options] < | > [options]: /? This help /f Force process kill This is the process id for the task to be killed. Use TLIST to get a valid pid The pattern can be a complete task name or a regular expression pattern to use as a match. Kill matches the supplied pattern against the task names and the window titles. If you wanted a gnu-win32 solution, this isn't it. Maybe someone can compile the source and post it somewhere. I'm not sure of the legal issues or I'd do it. Hope this helps, Pat Patrick Fay, Ph.D., Intel Corp. email: pfay AT co DOT intel DOT com Los Alamos National Lab wk: (505) 665-9141 TA3,Bldg 132, MS B272 fax: (505) 665-6333 Los Alamos NM 87545 ASCI-RED http://www.acl.lanl.gov/~pfay/teraflop - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".