One-click setting script for network IP address/MAC address/network proxy... It is always in use, but not exclusive. Share it...
@ Echo off
Rem #----------------------------------
Rem # interface IP configuration
Rem #----------------------------------
Echo ####################################### ###################
Echo ####################################### ###################
Echo ######
Echo ### IP fast confion (c) Copyright do2jiang. CSU. 2008.9 ###
Echo ######
Echo ####################################### ###################
Echo ####################################### ###################
Select the "A" key for ECHO: automatically obtain the IP address and DNS Configuration
Select the "h" key for ECHO and configure the home network in Zhejiang Province. The value range is :***.***.***.***
Select the "r" key for ECHO, and configure the raiway lab network with the IP address range: 192.168.118.157.
Select the "M" key for ECHO and configure the min221 lab network with the IP address range: 192.168.10.61.
Select the "N" key for ECHO and configure the network518 network. The value range is 218.196.73.52.
Select the "L" key for ECHO and perform the following network configuration: l showing 5-115, part: 218.196.68.78
Echo, select the "D" key, and configure the dormitory network, segment: 218.196.91.155-"ie proxy
Echo, select the "T" key, and configure the Mac network of Tao brother. The serial number is 218.196.91.42-> IE.
Select the "G" key for ECHO, and configure the small-high Mac network. The number segment is 218.196.91.186-"ie direct connection.
Select the "w" key for ECHO and configure the work place network. The value range is :***.***.**.***
Select "Q" for ECHO and exit the program.
For Echo, select "D", "H", "r", "M", "D", "W", "g", "T", "n", or" L "configure the network, press enter to confirm:
Set/p ch =
If % CH % = "" Echo "you input null" & Goto: EOF
Set case = A, A, H, H, R, R, M, M, D, D, T, T, G, G, n, n, l, l, q, Q/W> NUL
Echo % case % | findstr "/<% CH %/>"> NUL & if errorlevel 1 Goto: Err
Goto % CH %
Goto err
: DHCP "DHCP automatically obtains IP addresses"
:
:
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001d72289d62
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000000/F
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh int IP Set address "Local Connection" DHCP> NUL
@ Netsh int IP Set DNS "Local Connection" DHCP> NUL
Echo IP configure is done
Goto: EOF
: Home
: H
: H
: "Config IP of home"
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001d72289d62
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000000/F
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh int IP Set address "Local Connection" static 10.51.139.18 255.0.0.0 10.51.139.1 1> NUL
@ Netsh int IP Set DNS "Local Connection" static 10.51.139.1 primary> NUL
Echo IP configure is done
Goto: EOF
: Railway 513 lab
: R
: R
: "Config IP of railway. Lab"
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001d72289d62
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 192.168.118.157 mask = 255.255.255.0
@ Netsh interface IP Set address name = "Local Connection" Gateway = 192.168.118.3 gwmetric = 0
@ Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = 202.197.64.6 register = primary
@ Netsh interface IP add DNS name = "Local Connection" ADDR = 202.103.96.112 Index = 2
@ Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000000/F
: Static ing
@ Echo on
ARP-s 192.168.118.3 00-13-46-69-ee-72
@ Echo off
Ipconfig
Echo IP configure is done
Goto: EOF
: Democratic building 221 lab
: M
: M
: "Config IP of min221.lab"
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001d72289d62
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000000/F
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 192.168.10.61 mask = 255.255.255.0
@ Netsh interface IP Set address name = "Local Connection" Gateway = 192.168.10.1 gwmetric = 0
@ Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = 202.197.64.6 register = primary
@ Netsh interface IP add DNS name = "Local Connection" ADDR = 202.103.96.112 Index = 2
@ Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
: Static ing
: ARP-s 192.168.118.3 00-e0-4c-b3-28-90
Ipconfig
Echo IP configure is done
Goto: EOF
: Room 518-network518
: N
: N
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
@ Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
@ Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001d72289d62
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
: "Config IP for network 518"
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 218.196.73.52 mask = 255.255.255.0
@ Netsh interface IP Set address name = "Local Connection" Gateway = 218.196.73.254 gwmetric = 0
@ Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = 202.197.64.6 register = primary
@ Netsh interface IP add DNS name = "Local Connection" ADDR = 202.103.96.68 Index = 2
@ Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
Echo IP configure is done
Echo "User name: a0105183s"
Echo "Password: XXX
"
Goto: EOF
: 115
: L
: L
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
@ Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
@ Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 0019660e0782
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
: "Config IP for network 518"
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 218.196.68.78 mask = 255.255.255.0
@ Netsh interface IP Set address name = "Local Connection" Gateway = 218.196.68.254 gwmetric = 0
@ Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = 202.197.64.6 register = primary
@ Netsh interface IP add DNS name = "Local Connection" ADDR = 202.103.96.68 Index = 2
@ Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
Echo IP configure is done
Echo "User name: a0051153s"
Echo "Password: XXX
"
Goto: EOF
: 10 homes, 518 dormitories, Agents
: D
: "Config IP of dormitory"
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001d72289d62
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 218.196.91.157 mask = 255.255.255.0
: Delete a gateway.
@ Netsh interface IP Delete address "Local Connection" Gateway = all
: Set LAN proxy
Set proxyservervalue = FTP = 218.196.91.42: 808; http = 218.196.91.42: 808; HTTPS = 218.196.91.42: 808; socks = 218.196.91.42: 1080
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyserver/T REG_SZ/d % proxyservervalue %/F
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000001/F
Echo IP configure is done
Goto: EOF
: 10 homes in the headquarters, 518 dormitories-proxy (Breakthrough proxy disabled)
: C
: C
: "Config IP of dormitory"
Echo "Configure Mac, please wait 10 second ..."
: Tao's Mac
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 00508d6a023e
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 218.196.91.157 mask = 255.255.255.0
: Delete a gateway.
@ Netsh interface IP Delete address "Local Connection" Gateway = all
: Set LAN proxy
Set proxyservervalue = FTP = 218.196.91.42: 808; http = 218.196.91.42: 808; HTTPS = 218.196.91.42: 808; socks = 218.196.91.42: 1080
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyserver/T REG_SZ/d % proxyservervalue %/F
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000001/F
Echo IP configure is done
Goto: EOF
: 10 homes in the headquarters, 518 bedroom-tao Brother Mac direct connection
: T
: T
: "Config MAC of Tao brother"
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 218.196.91.42 mask = 255.255.255.0
@ Netsh interface IP Set address name = "Local Connection" Gateway = 218.196.91.254 gwmetric = 0
@ Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = 202.197.64.6 register = primary
@ Netsh interface IP add DNS name = "Local Connection" ADDR = 202.103.96.68 Index = 2
@ Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000000/F
: Mac of Tao Ge
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 00508d6a023e
Devcon disable * dev_1693 *
Devcon enable * dev_1693 *
Echo Mac configure is done
Echo "User name: a0105182s"
Echo "Password: xxxx
"
Goto: EOF
: 10 homes, 518 dormitories in the Headquarters-small high Mac direct connection
: G
: G
: "Config MAC of Tao brother"
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh interface IP Set address name = "Local Connection" Source = static ADDR = 218.196.91.186 mask = 255.255.255.0
@ Netsh interface IP Set address name = "Local Connection" Gateway = 218.196.91.254 gwmetric = 0
@ Netsh interface IP Set DNS name = "Local Connection" Source = static ADDR = 202.197.64.6 register = primary
@ Netsh interface IP add DNS name = "Local Connection" ADDR = 202.103.96.68 Index = 2
@ Netsh interface IP Set wins name = "Local Connection" Source = static ADDR = none
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000000/F
: Small High Mac
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001617169e73
Devcon disable * dev_1693 *
Devcon enable * dev_1693 *
Echo Mac configure is done
Echo "User name: a0105181s"
Echo "Password: xxxx
"
Goto: EOF
: Work Unit
: W
: W
: "Config IP of work intranet"
Echo "Configure Mac, please wait 10 second ..."
: Mac of sky
Reg Delete HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/F
Reg add HKEY_LOCAL_MACHINE/system/CurrentControlSet/control/class/{4d36e972-e325-11ce-bfc1-08002be10318}/0014/V networkaddress/d 001d72289d62
@ Devcon disable * dev_1693 *
@ Devcon enable * dev_1693 *
Reg Add "HKEY_CURRENT_USER/software/Microsoft/Windows/CurrentVersion/Internet Settings"/V proxyenable/T REG_DWORD/d 000000000/F
Echo "Configure IP address gateway, please wait 30 second ..."
@ Netsh int IP Set address "Local Connection" static 192.168.1.118 255.255.255.0 192.168.1.1 1> NUL
@ Netsh int IP Set DNS "Local Connection" static 192.168.1.1 primary> NUL
Echo IP configure is done
Goto: EOF
: ------------------------------------------ Quit -------------------------------
: Q
: Q
Goto: EOF
: Incorrect input
: Err
: "Error"
Echo your input "% CH %", no this argument!
Game over!
Goto: EOF