Hi,
Here's one way to do it without writing a lot of code.
The only drawback is you have to pass it a path that tells it where to
start the search. You can simply pass it C:\, but if there are other drives
it won't search them.
Put this code in a standard module in the declarations section:
Public Const MAX_PATH = 260
Public Declare Function SearchTreeForFile Lib "imagehlp" _
(ByVal RootPath As String, ByVal InputPathName As String, ByVal OutputPathBuffer As String) As Long
The code to call it can be put anywhere you like:
Dim tempStr As String
Dim Ret As Long
'create a buffer string
tempStr = String(MAX_PATH, 0)
'returns 1 when successfull, 0 when failed
Ret = SearchTreeForFile("c:\", "Dialer.EXE", tempStr)
If Ret <> 0 Then
MsgBox "Located file at " + Left$(tempStr, InStr(1, tempStr, Chr$(0)) - 1)
Else
MsgBox "File not found!"
End If
End Sub
Be aware that the search will take a while, so be patient and wait for the MsgBox