Configuring proxy through batch file [Solved/Closed]

rajeshk - Jun 10, 2009 at 07:45 AM - Latest reply:  axaitechie
- Dec 7, 2017 at 04:07 AM
Hello,
hi, I have created one batch file to add dns server detail automatically with the netsh command.
i want to configure the proxy details in Internet explorer so that I dont need to go to internet options-connection-lan setting-then proxy server optiop I can configure it by batch file.

thanks in advance

Regards
Rajesh
See more 

16 replies

merrypc 12 Posts Saturday January 3, 2009Registration date June 15, 2009 Last seen - Jun 10, 2009 at 07:55 AM
+12
Helpful
15
Hello,

I have found the solution to the problem:

Put this in a .vbs file. double click the file to run it.

dim oShell
set oShell = Wscript.CreateObject("Wscript.Shel  l")

if msgbox("Turn Proxy on?", vbQuestion or vbYesNo) = vbYes then
oShell.RegWrite "HKCU\Software\Microsoft\Windows\C  urrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
oShell.RegWrite "HKCU\Software\Microsoft\Windows\C  urrentVersion\Internet Settings\ProxyServer", "proxy:8080", "REG_SZ"
else
oShell.RegWrite "HKCU\Software\Microsoft\Windows\C  urrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
end if

Set oShell = Nothing
Please also suggest how to incorporate in the Internet shortcut "Target Path" command line.

So whenever I open the internet explorer from that shortcut, it sets up proxy.
Thnaks a lot...working fine
Thanks dear. It helped
Thank you!!! Exactly what I needed!
Saved my day as i needed to manually set proxy every 30 mins.. Thanks a ton!!!