Ruby获取windows系统安装的所有软件
require 'win32/registry'Win32::Registry::HKEY_LOCAL_MACHINE.open('Software\Microsoft\Windows\CurrentVersion\Uninstall') do |reg| reg.each_key do |key1,key2| k = reg.open(key1) puts k["DisplayName"] rescue "?" puts k["DisplayVersion"] rescue "?" puts k["Publisher"] rescue "?" puts k["URLInfoAbout"] rescue "?" puts endend?