[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

How to get and set the proxy of IE?

Wu Junchen

3/10/2008 11:05:00 AM

I want to let my program connect to internet using the proxy setting of
IE,and I spent some time to find it in google,but nothing was found.Is
there some way to do it?
Any help will be appreciated!
--
Posted via http://www.ruby-....

2 Answers

Siep Korteling

3/10/2008 1:23:00 PM

0

Wu Junchen wrote:
> I want to let my program connect to internet using the proxy setting of
> IE,and I spent some time to find it in google,but nothing was found.Is
> there some way to do it?
> Any help will be appreciated!

require 'win32/registry'

def get_proxy
path='Software\Microsoft\Windows\CurrentVersion\Internet Settings'
type, value
=Win32::Registry::HKEY_CURRENT_USER.open(path).read('Server')
return value
end

Untested, on my laptop the proxy is handled in another way (wininet.dll
?)

Regards,

Siep
--
Posted via http://www.ruby-....

Siep Korteling

3/10/2008 1:29:00 PM

0

Siep Korteling wrote:
> Wu Junchen wrote:
>> I want to let my program connect to internet using the proxy setting of

> Regards,
>
> Siep

Should be:

require 'win32/registry'

def get_proxy
path = 'Software\Microsoft\Windows\CurrentVersion\Internet Settings'
type, value =
Win32::Registry::HKEY_CURRENT_USER.open(path).read('ProxyServer') #!
return reg_value
end

regards,

Siep

--
Posted via http://www.ruby-....