:P
@echo off
:start
@cls
@color 4f
@mode con: COLS=60 LINES=35
echo.
echo.
echo Windows check!
echo happy!
echo.
echo ================================
echo study work hard hard hard hard
echo ================================
echo.
echo 1.All user PC Id Check
echo.
echo 2.Change Ip for Static
echo.
echo 3.Change Ip for DHCP
echo.
echo 7.Clear System
echo.
echo 8.Exit
echo.
:cho
set choice=
set /p choice= Choices:
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
if /i "%choice%"=="1" goto :startus1
if /i "%choice%"=="2" goto :no2
if /i "%choice%"=="3" goto :no3
if /i "%choice%"=="7" goto :no7
if /i "%choice%"=="8" goto :end
echo Error!,Please choices again!
echo.
goto :cho
:no2
set choice1=
set /p choice1= Please choices: IP(10.2.1._):
for /l %%a in (1,1,255) do (
if /i %choice1%==%%a goto :no20
)
goto start
:no20
ping 10.2.1.%choice1%
set choice3=
set /p choice3= Ready? (Y/N):
if /i "%choice3:~0,1%"=="y" goto no21
if /i "%choice3:~0,1%"=="N" goto :start
goto no2
:no21
netsh interface ip set address "%line%" static 10.2.1.%choice1% 255.255.252.0 10.2.1.221 1
netsh interface ip set dns "%line%" static 10.2.1.10
echo Ip has been changed!
echo Ip Static!
echo.
goto cho
:no3
netsh interface ip set address "%line%" source=dhcp
netsh interface ip set dns "%line%" source=dhcp
echo Ip has been changed!
echo Ip Dhcp!
echo.
goto cho
:no7
for /f "delims=" %%a in ('dir /s /b /a %temp%\') do del /f /q "%%a" & rd "%%a"
echo Clear sysetm OK!
echo.
goto cho
rem ---------------------------------------------------------------------------------------
rem ---------------------------------------------------------------------------------------
rem ---------------------------------------------------------------------------------------