Created
July 26, 2016 17:24
-
-
Save drewchapin/40fc29ee6d1009de2709e1a04bb5e61a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM Get IP Address from user | |
SET IPADDR= | |
SET /P IPADDR=Enter IP Address (Default 10.58.39.242): | |
IF /I '%IPADDR%'=='' SET IPADDR="10.58.39.242" | |
ECHO Applying IP Address, Subnet Mask, and Default Gateway... | |
NETSH interface ip set address "Local Area Connection" static %IPADDR% 255.255.255.0 10.58.21.254 > nul | |
IF errorlevel 1 GOTO FAIL | |
ECHO Applying DNS Server Settings... | |
NETSH interface ip set dns "Local Area Connection" static 10.58.21.204 > nul | |
IF errorlevel 1 ECHO Failed! | |
NETSH interface ip add dns "Local Area Connection" 10.60.10.131 index=2 > nul | |
IF errorlevel 1 ECHO Failed! | |
NETSH interface ip add dns "Local Area Connection" 10.60.10.132 index=3 > nul | |
IF errorlevel 1 ECHO Failed! | |
ECHO Adding DNS Suffixes... | |
REG add HKLM\System\CurrentControlSet\Services\Tcpip\Parameters /v "SearchList" /d "pgw.local,pgwglass.com" /f > nul | |
IF errorlevel 1 ECHO Failed! | |
ECHO Applying WINS Settings... | |
REM netsh interface ip set wins "Local Area Connection" static 10.60.10.131 | |
NETSH interface ip add wins "Local Area Connection" 10.60.10.132 index=2 > nul | |
IF errorlevel 1 ECHO Failed! | |
ECHO Applying Proxy Server Settings... | |
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /V ProxyEnable /T REG_DWORD /D 1 /F > nul | |
IF errorlevel 1 ECHO Failed! | |
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v DefaultConnectionSettings /t REG_BINARY /d "46000000a0010000010000001200000031302e35392e3132352e3232353a383038301d00000031302e35382e32312e2a3b31302e35382e33392e2a3b3c6c6f63616c3e000000000100000000000000f0c1fb7723ccca0100000000000000000000000002000000020000000a3a273c000000000000000001008020010000000000000050b226000e0100000000000014001f6880531c87a0426910a2ea08002b30309df80061800000000068007400740070003a002f002f007700770077002e0067006f006f0067006c0065002e0063006f006d002f0000000000c00000001400efbe13ce2fdf17000000000000000000000000000000000000000000000100000000000000000000000000000000050000000b0000002e00000068007400740070003a002f002f007700770077002e0067006f006f0067006c0065002e0063006f006d002f000000060000001e0000007700770077002e0067006f006f0067006c0065002e00" > nul | |
IF errorlevel 1 ECHO Failed! | |
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v SavedLegacySettings /t REG_BINARY /d "46000000bb030000010000001200000031302e35392e3132352e3232353a383038301d00000031302e35382e32312e2a3b31302e35382e33392e2a3b3c6c6f63616c3e000000000100000000000000f0c1fb7723ccca0100000000000000000000000002000000020000000a3a273c000000000000000001008020010000000000000050b226000e0100000000000014001f6880531c87a0426910a2ea08002b30309df80061800000000068007400740070003a002f002f007700770077002e0067006f006f0067006c0065002e0063006f006d002f0000000000c00000001400efbe13ce2fdf17000000000000000000000000000000000000000000000100000000000000000000000000000000050000000b0000002e00000068007400740070003a002f002f007700770077002e0067006f006f0067006c0065002e0063006f006d002f000000060000001e0000007700770077002e0067006f006f0067006c0065002e00" > nul | |
IF errorlevel 1 ECHO Failed! | |
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /V ProxyOverride /T REG_SZ /D "10.58.21.*;10.58.39.*;<local>" /F > nul | |
IF errorlevel 1 ECHO Failed! | |
REM REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /V ProxyServer /T REG_SZ /D "10.59.125.225:8080" /F > nul | |
IF errorlevel 1 ECHO Failed! | |
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /V ProxyServer /T REG_SZ /D "10.60.20.100:8080" /F > nul | |
IF errorlevel 1 ECHO Failed! | |
ECHO Done! | |
PAUSE | |
EXIT | |
:FAIL | |
ECHO Failed! | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment