PS (Process Status) for Windows 95 and Windows NT | CodeGuru

PS (Process Status) for Windows 95 and Windows NT

A PS (Process Status) program for Windows 95 and Windows NT. This is a program to list all the active processes under Windows 95 or Windows NT. It lists each program’s full path name and Process ID. If you run it with no command line arguments, it displays the output on the console. If you […]

Written By
CodeGuru Staff
CodeGuru Staff
Aug 6, 1998
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

A PS (Process Status) program for Windows 95 and Windows NT. This is a
program to list all the active processes under Windows 95 or Windows NT.
It lists each program’s full path name and Process ID. If you run it
with no command line arguments, it displays the output on the console.
If you supply an argument (regardless of what it is) it displays the
output in a Listbox instead.

In addition, a simple “kill” command is included. If you type “kill”
followed by the Process ID shown in the PS display, that process will be
killed (unless it’s a 16 bit Windows task, which would require a bit
more work.) When using KILL, you can use hex, decimal or octal for the
Process ID, following the normal C conventions — a prefix of “0x”
indicates hex, a prefix of `0′ indicates octal, and no prefix indicates
decimal.

Contents:


Full source code.


VC++ 5.0 SP3 project files. (untested with earlier versions)


hand-written makefile for command line builds.

Installation:

Unzip the ps_src.zip into a directory of your choice. Assuming you
have VC++ correctly intalled, switch to that directory and type
nmake. The executable should come to a bit under 8K.

If you use the VC++ project files, you’ll probably get a message
telling you that the project has been moved — this is normal unless
you happen to pick exactly the path name to put it in that I used.

Known bugs:

1) Under NT, DOS programs are not displayed. (16 bit Windows
programs are…)

2) If you attempt to use the PID supplied for a 16 bit Windows program
under NT to kill the program, killing the program will fail unless
the kill program takes the special nature of the program into
account. (You can kill the NTVDM that the Windows program runs under,
and with sufficient code, you should be able to kill the Windows
program by itself as well, but I don’t know of a kill program that
does so.)

This code was written by Jerry Coffin. It is hereby released into the
public domain. Since the program is free, I provide no guaranty or
warranty of any sort with it. However, if you report any bugs to
jcoffin@taeus.com, there’s a reasonable chance I’ll try to fix them when
I get a chance. Have fun.

Later,

Jerry.

Download demo project – 5KB

Download source – 16KB

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.