title: WinAPI call to locate a command on the systems path & environment?
body: <p>I recall seeing an API call or a .NET function where for example if I Start->Run</p>
  
  <p>cmd.exe</p>
  
  <p>it would search the %path% until it locates cmd.exe</p>
  
  <p>So that API would look like</p>
  
  <p>String path = GetFullPathOrWhatever("cmd.exe")
  // RESULT would be: c:\windows\cmd.exe OR WHEREVER THE SYSTEM WOULD FIND IT</p>
  
  <p>Any ideas which API does this search?</p>