Right now, I'm calling the following line
System.Configuration.Configuration cnf = ConfigurationManager.OpenMachineConfiguration();
the result is the following cnf.FilePath == C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
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.
aka - C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
Is there a way to get the 64 bit version without resorting to doing ConfigurationFileMaps - such as Configuration examples from Msdn
Update for comment
- Right now, the platform setting is set to Any Cpu
- I'm running the code in an class that inherits from System.Configuration.Install.Installer of a standard application
- This project where the code is situated is being run as a custom action in a Visual Studio Installer setup project