Find file in sub directories

I would like a VB.Net or even VBA script that looks on the C:\ drive for an executeable and then sets a string variable to that path.

The search would be confined to the following folders AND their sub folders
 C:\Program Files\ or C:\Program Files (x86)\

Once file is found it stops

myExecuteablePath = "foundFullPath"
Larry Bristersr. DeveloperAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:
oh you will need this..

see the code and instruction from this link

http://allenbrowne.com/ser-59.html
0
 
CodeCruiserConnect With a Mentor Commented:
For VB.NET, use Directory.GetFiles and check the count

http://msdn.microsoft.com/en-us/library/ms143316.aspx
0
 
Larry Bristersr. DeveloperAuthor Commented:
Thanks folks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.