Capture Window Title for all currently running exes through VB Script

damdell
damdell used Ask the Experts™
on
Hi,
I am trying to capture the window title of all active windows through VB Script.Some how it is not working.
Comment
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.
http://technet.microsoft.com/en-us/library/bb491010.aspx

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.
http://ss64.com/nt/for_f.html

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:
http://support.microsoft.com/kb/261593/
http://support.microsoft.com/kb/255713
http://support.microsoft.com/kb/300887

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.
http://technet.microsoft.com/en-gb/sysinternals

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.

Bill
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:
ftp://ftp.microsoft.com/Services/TechNet/samples/PS/Win98/Reskit/

If you open the Diagnose folder you will see a program named "TLIST.EXE":
ftp://ftp.microsoft.com/Services/TechNet/samples/PS/Win98/Reskit/DIAGNOSE/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