Skip to content

Instantly share code, notes, and snippets.

@Yasushi
Created February 13, 2009 03:27
Show Gist options
  • Save Yasushi/63023 to your computer and use it in GitHub Desktop.
Save Yasushi/63023 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'win32/registry'
Win32::Registry::HKEY_CURRENT_USER.open('Software\SimonTatham\PuTTY\Sessions') do |reg|
reg.each_key do |skname, wt|
reg.open(skname, Win32::Registry::KEY_READ|Win32::Registry::KEY_WRITE) do |sk|
puts "#{sk.keyname} BCE #{sk.read_i('BCE')}"
sk.write_i('BCE',1)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment