Girish Nemade wrote:
> HI...
> i want to read specific DWORD Value in registry i tried following
> 
> 
> Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Netscape\Netscape
> Navigator') do |reg|
>         reg_typ, reg_val = reg.read('')
>         return reg_val
>     end
> end
> 
> 
> But ths scrip only reads keys marked DEFAULT
> plss helpp me out...
> 
> Thnk You..

require 'win32/registry'
regkey=Win32::Registry::HKEY_LOCAL_MACHINE.open('SOFTWARE\Clients\Mail\Outlook 
Express')

# enumerate:
regkey.each_value do |subkey,type,data|
    puts "#{subkey}\t#{data}"     #(Default) subkey is an empty string
end

# specify just one:
puts regkey.read('DLLPath')[1]

hth,

Siep
-- 
Posted via http://www.ruby-forum.com/.