• bat批处理设置静态、动态、ping、查看网络配置


    @echo off
    :startIP
    set /p source=S or D or C or P or E:
    echo source:%source%
    if /i "%source%" == "S" ( goto staticIP )
    if /i "%source%" == "D" ( goto dhcpIP )
    if /i "%source%" == "C" ( goto ipconfig )
    if /i "%source%" == "P" ( goto ping )
    if /i "%source%" == "e" ( goto exitSet )
    :staticIP
    set /p IP=IP:
    netsh interface ip set address name="本地连接" source=static addr=%IP% mask=255.255.255.0 gateway=192.168.10.1
    goto startIP
    :dhcpIP
    netsh interface ip set address name="本地连接" source=dhcp
    goto startIP
    :ipconfig
    ipconfig
    goto startIP
    :ping
    set /p TARGET=TARGET:
    ping %target%
    goto startIP
    :exitSet
    exit
    @Rem @netsh interface ip set dns name="本地连接" source=static addr=192.168.10.1

    啦啦啦

  • 相关阅读:
    code3728 联合权值
    Codevs 4600 [NOI2015]程序自动分析
    code1540 银河英雄传说
    code1074 食物链
    堆排序
    哈夫曼树与哈夫曼码
    优先队列用法
    code1154 能量项链
    code1225 八数码Bfs
    javascript5
  • 原文地址:https://www.cnblogs.com/ClassNotFoundException/p/6646894.html
Copyright © 2020-2023  润新知