How to get and set the proxy of IE?

W

Wu Junchen

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!
 
S

Siep Korteling

Wu said:
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
 
S

Siep Korteling

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
 
R

Raveendran Perumalsamy

Hi,

I need SET method. I want to set some values in ProxyServer.

Awaiting your reply

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top