How to get Registry DWARD value ?

G

Girish Nemade

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..
 
S

Siep Korteling

Girish said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,933
Members
47,472
Latest member
blackwatermelon

Latest Threads

Top