R
Richard
Hi,
I'd like to be able to search a named hive for keys whose names match
a given regular expression.
I found, for example:
require 'win32/registry'
Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\\AdwareAlert\
\AdwareAlert\\RegInfo') do |reg|
puts reg['OrderNo']
end
which let me specify a specific key in the HKCU hive and print the
value of one of its entries.
I don't actually know why the foregoing is even syntactically correct
because http://www.ruby-doc.org/stdlib/libdoc/Win32API/rdoc/classes/Win32/Registry/Constants.html
says HKEY_CURRENT_USER is a constant in Win32::Registry. Therefore,
it seems to me that HKEY_CURRENT_USER can't have a method "open".
Any ideas?
TIA,
Richard
I'd like to be able to search a named hive for keys whose names match
a given regular expression.
I found, for example:
require 'win32/registry'
Win32::Registry::HKEY_CURRENT_USER.open('SOFTWARE\\AdwareAlert\
\AdwareAlert\\RegInfo') do |reg|
puts reg['OrderNo']
end
which let me specify a specific key in the HKCU hive and print the
value of one of its entries.
I don't actually know why the foregoing is even syntactically correct
because http://www.ruby-doc.org/stdlib/libdoc/Win32API/rdoc/classes/Win32/Registry/Constants.html
says HKEY_CURRENT_USER is a constant in Win32::Registry. Therefore,
it seems to me that HKEY_CURRENT_USER can't have a method "open".
Any ideas?
TIA,
Richard