[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Changing registry values with Win32::Registry

collintmiller

6/14/2007 9:20:00 PM

I'm trying to change a registry value for an IPTV SDK

This code:

Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\PATH_TO_KEY\").write("IgnoreTinyIFrames",Win32::Registry::REG_DWORD,0)

Returns this error:

Win32::Registry::Error: Access is denied.
from c:/ruby/lib/ruby/1.8/win32/registry.rb:743:in `write'
from (irb):150
from ?:0

Anybody know how I can ensure access to this key?

2 Answers

Jano Svitok

6/15/2007 7:51:00 AM

0

On 6/14/07, Collin Miller <collintmiller@gmail.com> wrote:> I'm trying to change a registry value for an IPTV SDK>> This code:>> Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\PATH_TO_KEY> \").write("IgnoreTinyIFrames",Win32::Registry::REG_DWORD,0)>> Returns this error:>> Win32::Registry::Error: Access is denied.> from c:/ruby/lib/ruby/1.8/win32/registry.rb:743:in `write'> from (irb):150> from ?:0>> Anybody know how I can ensure access to this key?use Win32::Registry::KEY_WRITE or another KEY_* access specifier asthe next parameter:Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\PATH_TO_KEY\\",Win32::Registry::KEY_WRITE).write("IgnoreTinyIFrames",Win32::Registry::REG_DWORD,0)J.

Dejan Dimic

6/15/2007 9:00:00 AM

0

On Jun 15, 9:51 am, "Jano Svitok" <jan.svi...@gmail.com> wrote:
> On 6/14/07, Collin Miller <collintmil...@gmail.com> wrote:
>
> > I'm trying to change a registry value for an IPTV SDK
>
> > This code:
>
> > Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\PATH_TO_KEY> > \").write("IgnoreTinyIFrames",Win32::Registry::REG_DWORD,0)
>
> > Returns this error:
>
> > Win32::Registry::Error: Access is denied.
> > from c:/ruby/lib/ruby/1.8/win32/registry.rb:743:in `write'
> > from (irb):150
> > from ?:0
>
> > Anybody know how I can ensure access to this key?
>
> use Win32::Registry::KEY_WRITE or another KEY_* access specifier as
> the next parameter:
>
> Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\PATH_TO_KEY\\",Win32::Registry::KEY_WRITE).write("IgnoreTinyIFrames",Win32::Registry::REG_DWORD,0)
>
> J.

Look at https://www.ruby-forum.com/t...