title: C# - How to get Program Files (x86) on Windows 64 bit
body: <p>I'm using:</p>
  
  <pre><code>FileInfo(
      System.Environment.GetFolderPath(
          System.Environment.SpecialFolder.ProgramFiles) 
      + @"\MyInstalledApp"
  </code></pre>
  
  <p>In order to determine if a program is detected on a users machine (it's not ideal, but the program I'm looking for is a right old kludge of a MS-DOS application, and I couldn't think of another method).</p>
  
  <p>On Windows XP and 32-bit versions of Windows Vista this works fine. However, on x64 Windows Vista the code returns the x64 Program Files folder, whereas the application is installed in Program Files x86. Is there a way to programatically return the path to Program Files x86 without hard wiring "C:\Program Files (x86)"?</p>