Configuring proxy through batch file

Solved/Closed
rajeshk - Updated on Dec 10, 2017 at 09:26 AM
 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

1 response

merrypc Posts 12 Registration date Saturday January 3, 2009 Status Member Last seen June 15, 2009 14
Jun 10, 2009 at 07:55 AM
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
12
Thanks man! The script is awesome! I had to remove some of the extra spaces, but it works perfect after that.
0
Awesome thanks so much! :)
0