方法1:- @echo off
- for /f "tokens=1,2* delims=:. " %%a in ('ipconfig') do if /i "%%a %%b"=="IP Address" set c=%%c
- (
- more +7<"%~f0"
- echo %c%=
- )>"C:\Program Files\713\1.ini"
- exit
-
- [LanguageID]
- ID=0
- [LanguageINI]
- 2052=2052.ini
- 1028=1028.ini
- 1033=1033.ini
- 3076=1028.ini
- 4100=1028.ini
- 5124=1028.ini
- [PlayMode]
- Client=0
- [Default]
- OpenFileMode=1
-
- MaxView=0
- [NetVicinage]
复制代码 方法2:- @echo off
- for /f "tokens=1,2* delims=:. " %%a in ('ipconfig') do if /i "%%a %%b"=="IP Address" set c=%%c
- (for /f "tokens=1* delims=:" %%a in ('findstr /n .* "11.txt"') do (
- echo/%%b
- if /i "%%b"=="[NetVicinage]" echo %c%=&goto:eof
- ))>"C:\Program Files\713\1.ini"
复制代码
[ 本帖最后由 hanyeguxing 于 2011-1-15 15:38 编辑 ] |