From: Navaneet Kumar Date: 2010-07-08T17:52:02+09:00 Subject: Re: Changing registry values with Win32::Registry How do we handle null value from opened HKEY instance. if (reg.read_i(name)!="") in below line I have tried but it doesn't work properly. Ex: Win32::Registry::HKEY_LOCAL_MACHINE.open(REG_PATH_1,Win32::Registry::Constants::KEY_ALL_ACCESS) do |reg| if (reg.read_i(name)!="") return reg.read_i(name) end end I need another instance to open for different REG_PATH. The reason behind that is if the reg key is in first path then return the value other wise open the key to read the reg key from different path. Thanks -- Posted via http://www.ruby-forum.com/.