Capture Window Title for all currently running exes through VB Script

damdell used Ask the Experts™
I am trying to capture the window title of all active windows through VB Script.Some how it is not working.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi damdell

Did you place this question in the correct Zone?
You defintely do need to do this in WINDOWS 98?
Not a later version of Windows?

The reason I ask is that in the NT-based versions of Windows there is the TASKLIST command that can be output to various formats and parsed for whatever information you want.

It is a long time since I used Windows 98, but I am sure that there was no command line program that allowed you to get a useful list of running programs, and additionally Windows 98's "DOS" doesn't support the FOR command that makes parsing text as easy as it does in Windows XP, etc.

I don't have any computers running Win98, and so cannot test, but I'm pretty sure that TASKLIST.exe from say a WinXP computer will not run on a Win98 one.

The Win98 version MSINFO32.exe does not allow you to create reports from the command line as can be done in Win2000 onwards, otherwise it could have been used:

The SysInternals utilities by Mark Russinovich and Bryce Cogswell started in 1996 and some of the earlier ones may have run in Windows 98 on a FAT32 drive, but all the ones that I can see on the Microsoft site (they bought SysInternals) are designed for NTFS partitions and minimum Windows 2000 otherwise there would have been one or more utilities of use.

I think that the best you may be able to do is try and use a 3rd-party utility to list the running tasks, if one exists for Windows 98.  I will search for any tools that might be available.

Just a follow up.  I was looking through my old Windows 98 repository and I found the "Microsoft TechNet Windows 98 Resource Kit" along with the URL to the base folder on the FTP site:

If you open the Diagnose folder you will see a program named "TLIST.EXE":

Run in Windows 98 (and it works in Windows XP), this displays the Process ID (PID) and module name.  Unfortunately it doesn't display the Window Title, but perhaps you might be able to use the listing along with a VBScript to get the Window Titles for the named processes.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial