From: Jam Date: 2012-06-02T01:18:45+09:00 Subject: Re: Registry editing in Windows 7 Hey, If this is a 64 bit OS, you're probably accessing the 32 bit registry by default under the wow32 node. Take a look in there, find some specific registry keys that are there and not in the 64 bit and you should be able to verify. Jams On Jun 1, 2012, at 10:11 AM, Jason Burgett wrote: > Ok, this is weird. If I use > > ----------------- > > require 'win32/registry' > > Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\7-Zip') do |reg| > value = reg['Path'] # read a value > puts value > end > > -------------------- > > I get "C:\Program Files\7-Zip\" returned to the console which is > correct. However, if I try other keys to test, for example: > > --------------------- > > require 'win32/registry' > > Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\RegisteredApplications') > do |reg| > value = reg['Paint'] # read a value > puts value > end > > --------------------- > > I get: > > "C:/Ruby193/lib/ruby/1.9.1/win32/registry.rb:385:in `open': The system > cannot find the file specified. (Win32::Registry::Error)" > > The permissions appear to be set the same on both keys too. > > -- > Posted via http://www.ruby-forum.com/. >