谢谢回复!
这是一个MUI的注册表文件TT1.txt如下:
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\0","FileName",,"ieakmmc.chm"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\0","Location",,"C:\WINDOWS\help\MUI\0804"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\1","FileName",,"ieeula.chm"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\1","Location",,"C:\WINDOWS\help\MUI\0804"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\10","FileName",,"jsdebuggeride.dll.mui"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\10","Version",,"8.0.6001.18702"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\10","Location",,"C:\Program Files\Internet Explorer\zh-cn"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\100","FileName",,"JSProfilerCore.dll.mui"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\100","Version",,"8.0.6001.18702"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\100","Location",,"C:\Program Files (x86)\Internet Explorer\zh-tw"
................
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\901","FileName",,"wininet.dll.mui"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\901","Version",,"8.0.6001.18702"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\901","Location",,"C:\WINDOWS\SysWOW64\sv-se"
想从中提取zh-cn相关的所有行,百度一个批处理
@echo off
setlocal enabledelayedexpansion
cd.>b.txt
for /f "delims=" %%i in ('more TT1.txt^|findstr /i /c:"zh-cn"') do (
set "str=%%i"
set str=!str:"zh-cn"=!
echo !str!>>b.txt
)
只能得到b.txt如下:
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\6","Location",,"C:\Program Files\Internet Explorer\zh-cn"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\7","Location",,"C:\Program Files\Internet Explorer\zh-cn"
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\8","Location",,"C:\Program Files\Internet Explorer\zh-cn"
................
hklm,"SOFTWARE\Microsoft\Updates\Windows Server 2003\SP0\IE8-MUI\Filelist\81","Location",,"C:\WINDOWS\SysWOW64\zh-cn"