zhclsy
初级用户
 
积分 83
发帖 34
注册 2007-10-14
状态 离线
|
『楼 主』:
[原创]是不是罗嗦了啊,帮我改改,谢谢!
: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 ---------------------------------------------------------------------------------------
:startus1
@set dress=d:\tep\fenlei.txt
@set /p tp=<nul>%dress%
@echo 姓名 全名 注释 用户的注释 帐户启用 帐户到期 上次设置密码 密码到期 密码可更改 需要密码 用户可以更改密码 允许的工作站 登录脚本 用户配置文件 主目录 上次登录 全局组成员>%dress%
@for /f "skip=6 tokens=1,2,3 delims=" %%a in ('net user /domain') do (
call :fenlei %%a %%b %%c
)
goto :start
:fenlei
@color 1c
@mode con: COLS=20 LINES=2
@echo 请耐性等待..
if not %1==nul (
set /p tp=%1 <nul>>%dress%
net user %1 /domain>"%temp%\~use.txt"
find "全名" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next0
)
:Next0
find "注释" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next1
)
:Next1
find "用户的注释" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next2
)
:Next2
find "帐户启用" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next3
)
:Next3
find "帐户到期" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next4
)
:Next4
find "上次设置密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next5
)
:Next5
find "密码到期" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next6
)
:Next6
find "密码可更改" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next7
)
:Next7
find "需要密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next8
)
:Next8
find "用户可以更改密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next9
)
:Next9
find "允许的工作站" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next10
)
:Next10
find "登录脚本" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next11
)
:Next11
find "用户配置文件" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next12
)
:Next12
find "主目录" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next13
)
:Next13
find "上次登录" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next14
)
:Next14
find "*" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2,3 delims=*" %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=*null<nul>>%dress%) else (set /p tp=*%%e<nul>>%dress%)
if %%f==nul (set /p tp=*null<nul>>%dress%) else (set /p tp=*%%f<nul>>%dress%)
)
@echo.>>%dress%
)
rem ---------------------------------------------------------------------------------------
if not %2==nul (
set /p tp=%2 <nul>>%dress%
net user %2 /domain>"%temp%\~use.txt"
find "全名" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next220
)
:Next220
find "注释" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next221
)
:Next221
find "用户的注释" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next222
)
:Next222
find "帐户启用" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next223
)
:Next223
find "帐户到期" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next224
)
:Next224
find "上次设置密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next225
)
:Next225
find "密码到期" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next226
)
:Next226
find "密码可更改" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next227
)
:Next227
find "需要密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next228
)
:Next228
find "用户可以更改密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next229
)
:Next229
find "允许的工作站" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next2210
)
:Next2210
find "登录脚本" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next2211
)
:Next2211
find "用户配置文件" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next2212
)
:Next2212
find "主目录" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next2213
)
:Next2213
find "上次登录" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next2214
)
:Next2214
find "*" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2,3 delims=*" %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=*null<nul>>%dress%) else (set /p tp=*%%e<nul>>%dress%)
if %%f==nul (set /p tp=*null<nul>>%dress%) else (set /p tp=*%%f<nul>>%dress%)
)
@echo.>>%dress%
)
rem ----------------------------------------------------------------------------------------------
if not %3==nul (
set /p tp=%3 <nul>>%dress%
net user %3 /domain>"%temp%\~use.txt"
find "全名" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next330
)
:Next330
find "注释" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next331
)
:Next331
find "用户的注释" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next332
)
:Next332
find "帐户启用" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next333
)
:Next333
find "帐户到期" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next334
)
:Next334
find "上次设置密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next335
)
:Next335
find "密码到期" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next336
)
:Next336
find "密码可更改" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next337
)
:Next337
find "需要密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next338
)
:Next338
find "用户可以更改密码" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next339
)
:Next339
find "允许的工作站" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next3310
)
:Next3310
find "登录脚本" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next3311
)
:Next3311
find "用户配置文件" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next3312
)
:Next3312
find "主目录" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next3313
)
:Next3313
find "上次登录" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2 delims= " %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=null: <nul>>%dress%) else (set /p tp=%%e <nul>>%dress%)
goto :Next3314
)
:Next3314
find "*" "%temp%\~use.txt">"%temp%\~use1.txt"
for /f "skip=2 tokens=1,2,3 delims=*" %%d in (%temp%\~use1.txt) do (
if %%e==nul (set /p tp=*null<nul>>%dress%) else (set /p tp=*%%e<nul>>%dress%)
if %%f==nul (set /p tp=*null<nul>>%dress%) else (set /p tp=*%%f<nul>>%dress%)
)
@echo.>>%dress%
goto :bge
)
:end
exit
此帖被 +2 点积分 点击查看详情 评分人:【 abcd 】 | 分数: +2 | 时间:2007-10-25 17:54 |
|
|
|