How do I search for a file?

What's the best method to search for a file on the hard drive on Win9x, NT, and Win2000 systems?

I need to find out if my application was already installed, and if so, where...  Of course I could write out a registry entry, but without this, what's the next best method?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

'does file exist using fso

Dim sFile$

sFile = "Name And Path Of Your File"

Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")

If fs.fileexists(sFile$) = True Then
      MsgBox "File Exists...Your code here!"
      MsgBox "Does Not Exist...Your code here!"
End If
      Set fs = Nothing

Ooops...the above only works if you know tht path. Sorry.
VBDesignsAuthor Commented:
If I knew the path I wouldn't have to search!  Sorry, I don't see how this answer applies unless the external call searches all hard drives and returns a directory.
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

There is a sample project that comes with VB5, which demonstrates how to search the disk(s) for a specific file(s). The sample project is located under the VB5..\Samples\Misc\FileCts - (its name is Winseek.vbp).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VBDesignsAuthor Commented:
I only have VB6.  I'll have to install the samples I guess.  I was just hoping there was a way to hook into the OS file search mechanism...
If you like, I can e-mail it to you.
Comment me your e-mail address.
VBDesignsAuthor Commented:
Actually, I went ahead and used the registry for what I needed to do.  I'll give you the points for answering though - thanks!
Thanks and you are welcome.
Happy new year.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.