ruby - Win32::Registry - delete_value - system cannot find file specified -


using: windows 7 pro sp1 x64

i'm trying delete existing value in registry (verified existence using regedit) following code:

require 'win32/registry'  keyname = 'software\microsoft\windows\currentversion\windowsupdate' access = win32::registry::key_all_access  win32::registry::hkey_local_machine.open(keyname, access) |reg|     reg.delete_value('susclientid') end 

the output of yields following exception:

c:/ruby200/lib/ruby/2.0.0/win32/registry.rb:768:in `delete_value': system cannot find file specified. (win32::registry::error)     c:/main_script.rb:7:in `block in <main>'     c:/ruby200/lib/ruby/2.0.0/win32/registry.rb:389:in `open'     c:/ruby200/lib/ruby/2.0.0/win32/registry.rb:496:in `open'     c:/main_script.rb:6:in `<main>' 

could me insight? in advance


Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -