On Jan 17, 2008 1:22 PM, Thufir <hawat.thufir / gmail.com> wrote:
> #desired output to match the output of:
> #reg query HKEY_LOCAL_MACHINE\Software\Policies\Microsoft

Hi Thufir,
i just continued what you wrote and it seems to work fine, eg,

C:\family\ruby>reg query HKEY_LOCAL_MACHINE\Software\Policies\Microsoft
! REG.EXE VERSION 3.0
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Conferencing
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Netlogon
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\SystemCertificates
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT

C:\family\ruby>irb
require 'rubygems'
#=> true
require 'win32/registry'
#=> true
include Win32
#=> Object
Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE,'Software\Policies\Micr
osoft').each_key{|k,id| p k}
"Conferencing"
"Netlogon"
"SystemCertificates"
"Windows"
"Windows NT"
#=> 5
Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE,'Software\Policies\Micr
osoft').each_key{|k,id| p "#{k} : #{id}"}
"Conferencing : 126539101535303750"
"Netlogon : 126539098962178750"
"SystemCertificates : 128406971361495897"
"Windows : 127990413567906710"
"Windows NT : 126539110549215000"

kind regards -botp