联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
if "%ip%" equ "192.168.1.2" ( start "" "E:\PCPolice\PCPolice.exe" ) else if "%ip%" equ "192.168.1.3" ( start "" "E:\88\888.exe" )
@echo off for /f "tokens=2 delims=:" %%i in ('ipconfig /all^|findstr /c:"Default Gateway"') do ( if "%%i" equ " 192.168.1.2" start "" "e:\pcpolice\pcpolice.exe" if "%%i" equ " 192.168.1.3" start "" "e:\88\888.exe" )
@echo off for /f "tokens=2 delims=:" %%i in ('ipconfig /all^|findstr /c:"IP Address"') do set str=%%i if "%str:~1%" equ "192.168.1.2" start "" "e:\pcpolice\pcpolice.exe" if "%str:~1%" equ "192.168.1.3" start "" "e:\88\888.exe"
@echo off for /f "tokens=2 delims=:" %%i in ('ipconfig /all^|findstr /c:"IP Address"') do set str=%%i if "%str:~1%" equ "192.168.1.1" (echo "Begin Copy..." & copy E:\ESafe\10\01\*.* e:\pcpolice>nul & start "" "e:\pcpolice\pcpolice.exe") if "%str:~1%" equ "192.168.1.183" (echo "Begin Copy..." & copy E:\ESafe\10\20\*.* e:\88 >nul & start "" "e:\88 \888.exe"
Originally posted by chuangxing at 2008-7-7 08:12 PM: 兄弟加了啊 但是缺少个语句 >nul 老是提示错误 兄弟对DOS是外行