title: Get the path to the 64-bit Program Files folder
body: <p>I'm using Windows 7 (x64) and I require the path to my 64-bit Program Files folder.</p>
  
  <p>To that end I tried using the <code>ExpandEnvironmentStrings</code> method, but but both examples below return the path the the 32-bit Progrom Files folder (<code>C:\Program Files (x86)</code>).</p>
  
  <pre><code>pfPath = Shell.ExpandEnvironmentStrings("%PROGRAMFILES%")
  pfPath = Shell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%")
  </code></pre>
  
  <p>I've also tried reading the registry value of <code>ProgramFilesDir</code>, but that returns the path of the 32-bit folder as well, despite the key actually containing the correct path (I've checked the registry).</p>
  
  <pre><code>pfPath = Shell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir") 
  </code></pre>
  
  <p>Is there another way of doing this that may yeild the correct path?</p>