hi, (yeah i know this is my second article, but i'm submitting a tip instead of a question so it shouldn't count

i'm working for a company that asked me to write a pice of software to find avrious bits of information on there computers, this program (informant) would be run every time a pc logges on.

the most difficult thing about my information gathering program is to search the hard disk for installed applications... it would be too slow if i had my program to search the disk about 20 times, so here's what i came up with (you'll need NT or DOS 6, NOT 7):

first run the command

"c:\winnt\system32\tree.com /f /a C:\ > c:\temp\temp.dat"

and then load the temp.dat and:

do until eof #1
lineput #1, strTempVar
If Frountpg = False Then Frountpg = InStr(1, ttemp, _
"frountpg.exe")
loop


this serachs for frount page. this may not be very ifficiant for seraching one program, but as the numbers of file you are searching for expand, then it would become more and more efficent, because your are only making on pass through the tree file.

if took my about 50 seconds to run through 9300 lines on a Pentium 133 with 128 mb of RAM searching for 10 files


if you could think of a more efficient way please reply to this articles :-), all comments welcome..


Zhang, again