IP-Configuration from Batch file
问题 @echo off set /p option=(1) Edit IP (2) Enable DHCP: if %option%==1 ( set /p IP=New IP-Address: set /p MASK=New Network Mask: set /p GATE=New Gateway Address: netsh interface ip set address name="LAN" static %IP% %MASK% %GATE% 1 ) if %option%==2 ( netsh interface ip set address name="LAN" source=dhcp ) pause The DHCP part of the program works just fine. The NIC's name is "LAN". I have tried with and without the 1 paramenter on the set IP. I have also tried with different variable names. The