
11-01-2005, 04:29 PM
|
|
Junior Contributor
|
|
Join Date: Oct 2005
Posts: 301
|
|
Changing proxy settings without restarting application
|
Hi, I'm not sure if I should post this in "General", "Communications" or in "File I/O and Registry". I don't know if it's a problem with the proxy, registry or neither, so I hope this is the right place.
I'm changing proxy settings, by saving them in the registry. The proxy is used with a WebBrowser control. The problem is that I need to restart the application before the proxy works. Is there any way around that ?
This is the code I use to change the proxy settings:
Code:
Dim regmod
Set regmod = CreateObject("WScript.Shell")
'Set proxy server and port
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", 123.123.123.123:1111, "REG_SZ"
'Enable the proxy server
regmod.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
|
|