Can't get example to work....



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

.



Relevant Pages

  • Re: Event Viewer
    ... It depends on the application reporting the event. ... possible to configure it to be less "verbose". ... > We have a persistent event, but unfortunately, there is no "fix" for the ... > root of the problem. ...
    (microsoft.public.win2000.general)
  • Re: YaST2 Patches help required
    ... The crash has just happened again with the verbose enabled. ... root ... title Failsafe -- SUSE Linux Enterprise Desktop 10.2 SP2 ...
    (alt.os.linux.suse)
  • Re: ads7846 touchscreen: fix pressure
    ... Didn't you also have a bigger cleanup patch for ads7846? ... Cleanup touchscreen driver and fix pressure on spitz. ... +#ifndef VERBOSE ... removed as soon as the affected platform's IRQ handling is fixed. ...
    (Linux-Kernel)
  • Re: [PATCH -tip] drivers/serial/8250.c: i may be used uninitialized
    ... I have yet to meet a too verbose commit log, and i've seen many - so ... cleanup, fix bogus gcc warning ... the maintainer can concentrate on "does what the patch does ...
    (Linux-Kernel)
  • [PATCH] ACPI: EC: fix compilation warning
    ... Fix the warning introduced in commit c5279dee26c0e8d7c4200993bfc4b540d2469598, ... and give the dummy variable a more verbose name. ... * which needs it, has fake EC._INI method, so use it as flag. ...
    (Linux-Kernel)