Wind7 procesamiento por lotes IP (script)

  
        Descripción: Complete su propia dirección IP en x.x.x.x. Guárdelo como un archivo " .bat " y ejecútelo como administrador. El código es el siguiente: @echo off: mainclsecho Siga las indicaciones ... echo.echo 1 STI-HUSTecho 2 Dian-HUST-711echo 3 DHCPecho 4 Exitecho.set /p choice = Ingrese un número: echo.if "% choice% " == " 1 > goto ip_STIif "% choice% " == " 2 > ip_Dian711if "% choice% " == " 3 > ip_DHCPif "% choice% == " 4 > goto ip_Exitgoto main: ip_STIecho IP auto-setting ... echo.echo update IP y subred máscara netsh interfaz ip set dirección nombre = " conexión local " source = static addr = xxxx mask = xxxx gateway = xxxx Gwmetric = 1echo actualizar DNS servidor netsh interfaz ip configurar dns nombre = "conexión local" fuente = estática addr = xxxx registro = PRIMARYnetsh interfaz ip agregar "dns nombre", "conexión local" agregar "addr = xxxxecho configurar terminar pauseexitif errorlevel 2 goto Mainif errorlevel 1 goto end: ip_Dian711echo IP auto-setting ... echo.echo actualizar IP y máscara de subred interfaz netsh ip set dirección nombre " conexión local " source = static addr = xxxx mask = xxxx gateway = xxxx gwmetric = 1echo Actualizar el servidor DNS netsh interface ip set dns name = " conexión local source = static addr = xxxx register = PRIMARYnetsh interface ip add dns name = " conexión local " addr = xxxxecho settings Complete pauseexitif errorlevel 2 goto mainif errorlevel 1 goto end: ip_DHCPnetsh interface ip set address name = " conexión local " source = dhcpnetsh interface ip set dns name = " local connection " source = dhcpnetsh interface ip set wins name = " Conexión local " source = configuración dhcpecho para finalizar pauseexitif errorlevel 2 goto mainif errorlevel 1 goto end: ip_Exitexit
Copyright © Conocimiento de Windows All Rights Reserved