Possible Duplicate:
How to detect Windows 64 bit platform with .net?
Project : C# .5
Description: The code checks whether the underlying machine is 64 bit or 32 bit OS.
Return Value: The code always return a null value. WHY ? 
  if (8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
            {
                return Environment.GetEnvironmentVariable("SysWOW64");
            }
            return Environment.GetEnvironmentVariable("system32");
 
     
     
     
    