title: How to find the path to the executable of a program
body: <p>In a VB.NET application I need to set a button to start a program - specifically, Steam. But I need to allow for the user having installed the program somewhere other than the default location "C:\Program Files (x86)\Steam". So all I know is the executable name: "steam.exe".</p>
  
  <p>In searching for an answer it looks like I should be able to get the path using Microsoft.Win32.Registry somehow, but the examples I'm seeing aren't helping me (I guess I'm just not getting how to apply those examples to my situation).</p>
  
  <p><a href="http://visualbasic.about.com/od/quicktips/qt/regprogpath.htm" rel="nofollow">This tutorial</a> gives the example of finding the path to the excel executable:</p>
  
  <pre><code>Dim regKey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\MICROSOFT\Windows\CurrentVersion\AppPaths\excel.exe")
  Dim path As String = regKey.GetValue("Path").ToString
  </code></pre>
  
  <p>But I'm getting a value of "Nothing" for regKey. Not only that, even if it did get a value for <code>regKey</code>, how would I know the registry path for another program (Steam, in my case)?</p>
  
  <p>And how much will the version of Windows change the possible registry location of a program - if at all?</p>