求教批处理高手!~
发布网友
发布时间:2024-10-01 01:45
我来回答
共6个回答
热心网友
时间:2024-11-24 22:12
加到启动的问题,你有管理权限应该会做吧.
批处理下载
http://www.fileden.com/files/2007/5/8/1059086/k4me_ip2run.rar
以下为批处理内容
=-====================
'k4me
'k4me 2008
'19;56 星期三 2008年10月29日
'原题目(根据本机IP段运行相应程序
setlocal
ipconfig|find "IP Address. . . . . . . . . . . . :">k4me_ip.txt
for /f "tokens=15 delims= " %%i in (k4me_ip.txt) do set k4me=%%i
set k4melast=%k4me:~10,3%
@echo %k4melast%
'1-18 19-66 67-100
'set k4melast=19
if %k4melast% LSS 19 start 1.exe& goto end
if %k4melast% GTR 66 start 3.exe& goto end
start 2.exe
:end
热心网友
时间:2024-11-24 22:12
可以执行的:
@echo off
for /f "tokens=16 delims=." %%i in ('ipconfig^|^find "IP"') do (
if %%i leq 18 (
start 1.exe
) else if %%i leq 66 (
start 2.exe
) else if %%i leq 100 (
start 3.exe
))
热心网友
时间:2024-11-24 22:12
非常好!
@echo off
for /f "tokens=16 delims=." %%i in ('ipconfig^|findstr /i /c:"ip address"') do (
if %%i lsq 18 (
start \\server\share\1.exe
) else if %%i lsq 66 (
start \\server\share\2.exe
) else if %%i lsq 100 (
start \\server\share\3.exe
) else goto :eof
)
热心网友
时间:2024-11-24 22:13
下面的代码测试可以通过.可能要删除多的空格才能用二dfgsdfgert
@echo off & setlocal enabledelayedexpansion
ipconfig >1.txt
for /f "tokens=2 skip=7 delims=:" %%i in (1.txt) do (
echo %%i>>2.txt
)
for /f "tokens=4 delims=." %%i in (2.txt) do (
echo %%i>1.txt
goto :aa
)
:aa
for /l %%a in (1,1,18) do (
set ac=%%a
for /f "delims=" %%k in (1.txt) do (
set /a a=%%k
)
for %%i in (!ac!) do (
if !ac! EQU !a! start "" "\\server\abc\1.exe"
)
)
for /l %%a in (19,1,66) do (
set ac=%%a
for /f "delims=" %%k in (1.txt) do (
set /a a=%%k
)
for %%i in (!ac!) do (
if !ac! EQU !a! start "" "\\server\abc\2.exe"
)
)
for /l %%a in (67,1,100) do (
set ac=%%a
for /f "delims=" %%k in (1.txt) do (
set /a a=%%k
)
for %%i in (!ac!) do (
if !ac! EQU !a! start "" "\\server\abc\3.exe"
)
)
del 1.txt
del 2.txt
exit
热心网友
时间:2024-11-24 22:14
http://hi.baidu.com/ak7381/blog/item/b378c513991c8725dc54017c.html
热心网友
时间:2024-11-24 22:14
看二楼的,看懂了你就入门DOS批处理了.