Configuring proxy through batch file

March 2017


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. How can I configure it by batch file.


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"
oShell.RegWrite "HKCU\Software\Microsoft\Windows\C  urrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
end if

Set oShell = Nothing


Published by aakai1056.
This document, titled "Configuring proxy through batch file," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (