Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

windows auto ip address change script

@ECHO off
cls
:start
ECHO.
ECHO 1. Change Connection1 Static IP 
ECHO 2. Change Connection2 Static IP 
ECHO 3. Change Connection3 Static IP 
ECHO 4. Obtain an IP address automatically
ECHO 5. Exit
set choice=
set /p choice=Type the number to print text.
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto con1
if '%choice%'=='2' goto con2
if '%choice%'=='3' goto con3
if '%choice%'=='4' goto autosearch
if '%choice%'=='5' goto end
ECHO "%choice%" is not valid, try again
ECHO.
goto start
:con1
ECHO Connecting Connection 1
netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1
goto end

:con2
ECHO Connecting Connection 2
netsh interface ip set address "Local Area Connection1" static 192.168.0.10 255.255.255.0 192.168.0.1 1
goto end

:con3
ECHO Connecting Connection 3
netsh interface ip set address "Local Area Connection2" static 192.168.0.10 255.255.255.0 192.168.0.1 1
goto end

:autosearch
ECHO obtaining auto IP
ipconfig /renew "Local Area Connection"
goto end

:bye
ECHO BYE
goto end

:end
Comment

PREVIOUS NEXT
Code Example
Shell :: como veo lo que he cambiado en git 
Shell :: raspian buster mit uv4l 
Shell :: silent installation with powershell 
Shell :: add pc to domin and change name with powershell 
Shell :: pip prohibit install without venv 
Shell :: change webcam whitebalance ubuntu 
Shell :: magemojo cron extension installation 
Shell :: hp probook 6560b hackintosh 
Shell :: Hashicorp Vault create encryption key in transit from CLI 
Shell :: goodix debug linux 
Shell :: godot mask over mask 
Shell :: ping command output to null in linux 
Shell :: instalar ultima version de npm 
Shell :: cant download tree ubuntu windows 10 
Shell :: head until last line 
Shell :: why lubuntu 20.04 freezes 
Shell :: ansible use host file flag 
Shell :: install bc command mac 
Shell :: bash commands inside Tcl 
Shell :: Could NOT find Boost (missing: filesystem) 
Shell :: grails environment variables ubuntu 
Shell :: How to open a file from terminal in libre writer 
Shell :: install pusher srever in larvel 
Shell :: bower install 
Shell :: how to remove pem pass phrase 
Shell :: -d flag linux if 
Shell :: centos remote desktop 
Shell :: como agregar angular material al proyecto 
Shell :: ansible only disable service if installed 
Shell :: grep extract only matched string 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =