tags:

views:

783

answers:

4

Hi,

To change Proxy server I have to go to IE->Internet Options->LAN Settings and click on "Use a proxy server for your LAN". I am sure there is some way of doing that by code. Does anybody has any idea how to do it (C#)?

Thanks a lot.

Sincerely, Vlad

A: 

Is this what you're looking for?

http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.proxy(VS.71).aspx

PSU_Kardi
Thanks for help, but this is not what I am looking for. I need to change IE/Chrome/Fire/Firefox browser setting by some code or shortcut. Similar to IE7 Pro I can click on Ctrl+F9 and switch browser settings to use proxy. I could use IE7 Pro, but it only works with IE, and I need some solution that will work with other for anything. I need that when I am working on VPN and I need to switch browser to use VPN proxy server.Thanks again.Sincerely,Vlad.
Vlad Bezden
What if you did something like this. Create a batch file, make a link to it on your desktop and then make a shortcut command for it.For instance I have ctrl+alt+n open-up notepad.Windows Registry EditorVersion 5.00[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]"ProxyEnable"=dword:00000001"ProxyServer"="10.22.40.6:3128"
PSU_Kardi
A: 

If you want to setup the proxy for use by your code you can set it via the GlobalProxySelection.Select property.

However Microsoft does not recommend setting the proxy manually and recommends always using the default proxy.

Paul Alexander
+2  A: 

What if you were to make a batch file, and then create a shortcut to it on your desktop, and then hotlink to it with something like ctrl+alt+n

And the batch looked like this:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyEnable"=dword:00000001 "ProxyServer"="10.22.40.6:3128"

PSU_Kardi
Thanks a lot. That is it. I did not know that setting is in registry. I can write any code to change that flag.Vlad.
Vlad Bezden
Glad I could be of help. Take care
PSU_Kardi
A: 

Using batch it is really easy to change IE PROXY settings frequently whenever required. However I created a batch named PROXY Customization to resolve the issue.Please visit the link to download the product http://techsolutionpoint.blogspot.co...-automate.html. You will only required to change change the PROXY address & port. It is free.

makader