Because different IP addresses are used in different networks, it is very difficult to manually set each time, and write a batch. As follows:
@ Title wireless network setting to 251
@ REM modify the DOS window color
@ Color 0b
@ Echo off
@ REM set Internet network parameters
Set Nic = "wireless network connection"
Set IP = "192.168.0.171"
Set mask = "255.255.255.0"
Set GW = "192.168.0.20"
Set DNS = "202.101.103.55"
Set GM = 1
@ ECHO is modifying the network configuration to the Internet IP address, Gateway 251...
@ Netsh interface IP Set address name = % Nic % source = static ADDR = % IP % mask = % mask % gateway = % GW % gwmetric = % GM %
@ ECHO: Set DNS to Internet DNS (% DNS % )...
@ Netsh interface IP Set DNS name = % Nic % source = static ADDR = % DNS %
@ ECHO: Set successfully.
MSG % username %/Time: 2 congratulations, % Nic % set successfully!