title: Ruby - how to read registry keys for 32 bit and 64 bit applications from 32 bit ruby
body: <p>I am using ruby 32 bit in my application. I am using "win32/registry" for reading registry keys.</p>
  
  <p>When i use </p>
  
  <pre><code>reg = Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\app_path')
  reg_typ, reg_val = reg.read('somekey')
  </code></pre>
  
  <p>It by default reads in path </p>
  
  <blockquote>
    <p>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\app_path</p>
  </blockquote>
  
  <p>.</p>
  
  <p>Now some of the applications are 64 bit and I want to check for </p>
  
  <blockquote>
    <p>HKEY_LOCAL_MACHINE\SOFTWARE\app_path</p>
  </blockquote>
  
  <p>h. But, by default it always try to find under "WOW6432Node"</p>
  
  <p>Any suggestion on what I am missing and how can i read registry for both 32 and 64 bit applications from ruby?</p>