From: Jason Roelofs Date: 2007-10-03T23:09:46+09:00 Subject: Re: Can't get example to work.... ------=_Part_13530_27673272.1191420584594 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline You seem to be missing an "end", but I'll assume that's a copy/paste error. The code works for me, Ruby 1.8.6 (OneClickInstaller). As a style note, require lines shouldn't have the ".rb" in them, so do: require "win32/registry" Jason On 10/3/07, Brad wrote: > > Hello, > > I must be doing something wrong but I don't know what. I'm trying to > use this example to learn more about the Win32API::Registry library. > > require 'win32/registry.rb' > > $VERBOSE = nil > > appList = [] > > Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Microsoft\Windows > \CurrentVersion\Uninstall') do |root| > > root.each_key do |k| > Win32::Registry::HKEY_LOCAL_MACHINE.open(root.keyname + > "\\#{k[0]}") > do |key| > key.each do |i| > if i[0] == "DisplayName" > appList.push(i[2]) > end > end > end > end > > When I run it I get: uninitialized constant Win32> > > How do I fix this? > > Thank you. > > Brad > > > ------=_Part_13530_27673272.1191420584594--