From: Alan Chen Date: 2005-09-29T07:46:44+09:00 Subject: Re: where to look for API win32/registry Alexandru Popescu wrote: > Hi! > > I am trying to write a small script that cleans up the registry after starting Skype (which on > regular basis registers itself in Run). > > What I am looking now is the API of Win32::Registry. Where can I find it? > > So far I have done this: > > require 'win32/registry' > Run_branch = 'Software\Microsoft\Windows\CurrentVersion\Run' > Skype_key = 'Skype' > Win32::Registry::HKEY_CURRENT_USER.open(Run_branch, Win32::Registry::Constants::KEY_ALL_ACCESS) do | > | reg | > reg_typ, reg_val = reg.read(Skype_key) > puts "type: #{reg_typ}" > puts "val : #{reg_val}" If you haven't built, or don't have an install of, the rdoc documentation for Ruby, you can find it at http://www.ruby-doc.org/stdlib/ Modifying and deleting is fairly easy, IIRC: reg[Skype_key] = "new value" reg.delete_key(Skype_key) Cheers, - alan