Wow6432Node - 32-bit Application on Windows 7 64-bit
My 32-bit application (.Net Framework 3.5 compiled with MS Visual Studio 2008) has got problems when it is installed on Windows 7 64-bit machines.
I found this code to access a Registry path saved on a Windows 64-bit machine.
Quote:
RegistryKey registryKey;
if (Environment.Is64BitOperatingSystem == true)
{
registryKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64);
}
else
{
registryKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry32);
}
I wonder why should I change my application to work on both Windows 32-bit and 64-bit.
Shouldn't Windows 7 64-bit take care of it? Isn't this an installation issue, instead of my app duty to discriminate among the operating systems?
Is that code a good approach to solve it, or there's something better? For instance, changing something in the installer setup, rather than the application itself.