Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, I want to get the path where mstest.exe resides using c#. How can i get it
Posted
Comments
Arjun Menon U.K 16-Oct-14 11:53am    
var ext = new List<string> {".exe"};
var myFiles = Directory.GetFiles("C:\\", "*.*", SearchOption.AllDirectories).Where(s => ext.Any(file => s.EndsWith(file)));

I tried using this. But when the access denied files are checked, it throws an error

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900