From: Jam Date: 2012-06-01T13:56:34+09:00 Subject: Re: Registry editing in Windows 7 Hey Jason, Try starting with a read operation so you know you're interacting with the expected registry. The wow32 node has caught me by surprise a few times. Jams On May 31, 2012, at 9:20 PM, Jason Burgett wrote: > I'm trying to edit 1 key in the Windows 7 registry and I'm having > trouble. Here's what I have so far: > > ------------------- > > require 'win32/registry' > > keyname = 'Software\Tightvnc\Server' > access = Win32::Registry::KEY_ALL_ACCESS > > Win32::Registry::HKEY_LOCAL_MACHINE.open(keyname, access) do |reg| > reg['Password'] = '7a,2f,07,fd,36,74,7c,52' > end > > ------------------- > > The key has a BINARY value that is already set to another value. When I > run the .rb file from an administrative command prompt it seems to run > with no errors, but the value never changes. > > -- > Posted via http://www.ruby-forum.com/. >