WinPE System Internet Code Encyclopedia:
echo is setting IP-DNS configuration
@echo off
netsh add helper ifmon.dll
netsh interface ip set address "Local Area Connection" static addr=192.168.1.174 mask=255.255.255.0 gateway=192.168.1.1 Auto
netsh interface ip set address "Local Area Connection" static addr=192.168.1.174 mask=255.255.255.0 gateway=192.168.1.1 Auto
netsh interface ip set DNS name= "Local Area Connection" static 218.85.157.99
netsh interface ip add DNS name= "Local Area Connection" 218.85.152.99
The IP address and DNS address are represented by:
(We can control the change into their own, no technical content.) )
IP Address: 192.168.1.174
Subnet Mask: 255.255.255.0
Default gateway: 192.168.1.1
dns:218.85.157.99
218.85.152.99
Another is to modify the address of the network card (and Mac) in the following paragraph, the last quote "00E081031837" as follows:
Echo writes a new Mac value to the registry
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-
11ce-bfc1-08002be10318}001 "/f/v" networkaddress "/t reg_sz/d
"00E081031837"
Change to the code you want (no transcoding!)
The last is about enabling/disabling the writing of the NIC, using the DevCon of this tool disable (disabled) and enable (enabled) hardware device, right key My computer then is the properties-hardware-Device Manager-Network Configurator, and then to the modified network adapter right key properties-Details The Last drop-down box select "Hardware ID", is the network card on your machine "hardware ID" in the code is:
The "dev_8139" value in "&DEV_8139&" is the hardware ID code we want.
Lookup related to "dev_8139" in batch processing
Replace all powertrain to find "dev_8139" (for example)
This IP DNS MAC address is a key set!
The code in the original text is as follows:
@echo off
PUSHD%~dp0
SET tp=%cd%
Title Welcome to use the patron King DIY Ip-dns-mac Quick Set
Color 4f
Echo is setting the configuration of IP, DNS.
@echo off
netsh add helper ifmon.dll
netsh interface ip set address "Local Area Connection" static addr=192.168.1.174 mask=255.255.255.0 gateway=192.168.1.1 Auto
netsh interface ip set address "Local Area Connection" static addr=192.168.1.174 mask=255.255.255.0 gateway=192.168.1.1 Auto
netsh interface ip set DNS name= "Local Area Connection" static 218.85.157.99
netsh interface ip add DNS name= "Local Area Connection" 218.85.152.99
Echo writes a new Mac value to the registry
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}001"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}008"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}002"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}003"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}004"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}005"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}006"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}007"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}009"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
REG ADD "hklmsystemcurrentcontrolsetcontrolclass{4d36e972-e325-11ce-bfc1-08002be10318}010"/f/v "NetworkAddress"/t reg_sz/d "00E081031837"
Echo is disabling the native NIC
DevCon disable *dev_3065*
ECHO is enabling the native NIC
echo Friendship Tip: This operation time is longer, please wait patiently, after the completion of the script, this window will automatically exit.
DevCon enable *dev_3065*
Goto END
: End
Start IExplore
Exit