Popular Ruby recipes tagged "registry"http://code.activestate.com/recipes/langs/ruby/tags/registry/2012-11-19T08:49:26-08:00ActiveState Code RecipesRetrieve codecs (Ruby)
2012-11-19T08:49:26-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578340-retrieve-codecs/
<p style="color: grey">
Ruby
recipe 578340
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/codecs/">codecs</a>, <a href="/recipes/tags/ironruby/">ironruby</a>, <a href="/recipes/tags/registry/">registry</a>).
</p>
<p>On WinXP (there is no other Windows in my VMWare Player :) you can do it with Ruby in the next way:</p>
<p>require 'win32/registry'</p>
<p>Win32::Registry::HKEY_CLASSES_ROOT.open(
'CLSID{083863F1-70DE-11d0-BD40-00A0C911CE86}\Instance'
) do |reg|
reg.each_key do |key|
val = reg.open(key)
puts val['FriendlyName']
end
end</p>
<p>But what about extended information, aah? I'm talking about script which shows additional data such as CLSID and codec location. With IronRuby it can be done so easy.</p>
Reading all subvalues of key (Ruby)
2012-11-19T08:41:11-08:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578337-reading-all-subvalues-of-key/
<p style="color: grey">
Ruby
recipe 578337
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/registry/">registry</a>).
</p>
<p>With Ruby you can make wonders ;) This snippet shows how to read all subvalues of a key at one time.</p>