title: Getting 64 bit version of machine.config
body: <p>Right now, I'm calling the following line</p>
  
  <pre><code>System.Configuration.Configuration cnf = ConfigurationManager.OpenMachineConfiguration();
  </code></pre>
  
  <p>the result is the following
  cnf.FilePath == C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config</p>
  
  <p>I get the following result on a 32bit 2003 server and a 64 bit 2008 R2 server.
  Ideally I would like to return the 64bit folder when installed on a 64bit server.</p>
  
  <p>aka - C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config</p>
  
  <p>Is there a way to get the 64 bit version without resorting to doing ConfigurationFileMaps - such as 
  <a href="http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.openmachineconfiguration%28v=VS.100%29.aspx" rel="nofollow">Configuration examples from Msdn</a></p>
  
  <p>Update for comment</p>
  
  <ul>
  <li>Right now, the platform setting is set to Any Cpu</li>
  <li>I'm running the code in an class that inherits from System.Configuration.Install.Installer of a standard application</li>
  <li>This project where the code is situated is being run as a custom action in a Visual Studio Installer setup project </li>
  </ul>