我找一个批处理文件内容如下
Set flag=
dmi.exe /f
:check
If Not Exist DMIINFO.TXT Goto check
chcp 936>nul
For /f "tokens=2 delims==" %%i In ('findstr /bi "Product_Name" DMIINFO.TXT') do set type=%%i
Echo 你的型号是:%type% 系统正在分配驱动
ping -n 6 %computername%>nul
Set type=%type:*-=%
For /l %%i In (1,1,9) Do If "%type:~1,1%"=="%%i" Set type=%type:~0,2%
For /f "delims=" %%i In ('dir /a-d /b "*%type:~0,3%*.txt" 2^>nul') do (
Set flag=1
For /f "delims=" %%j In ('dir /ad /b^|findstr /ivx /g:"%%i" 2^>nul') do rd /q /s "%%j" 2>nul
)
Del /f /q *.txt 2>nul
If Not defined flag (
For /d %%i In (*) Do rd /q /s "%%i" 2>nul
Echo 无法找到符合%type%笔记本的驱动
Echo 此窗口20秒后自动退出
ping -n 20 %computername%>nul
)
Del "%~0"
pause
我不是很清楚 For /f "tokens=2 delims==" %%i In ('findstr /bi "Product_Name" DMIINFO.TXT') do set type=%%i
这一行里的意思。
如果我想修改。从INFO.txt里取得一个信息怎么修改
INFO.txt的内容是如下我用红色表表示我要取得的内容
哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪?
BIOS Info Tool v1.3, Copyright(c) 2004 by Serge Galkin (StarGaz0r)
Win9x/Win2k/XP version e-mail:
stargaz0r@nm.ru
屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯屯
?ROM BIOS by American Megatrends Inc., 02/05/07
BIOS ID String: ??
Version: ? release date: //
?DMI.BaseBoardInformation:
Manufacturer: Sony Corporation
Product: VAIO
Version: N/A
Serial Number: N/A
?DMI.SystemInformation:
Manufacturer: Sony Corporation
Product Name: VGN-FE770G
Version: C3LMMYGJ
Serial Number: 28247830-3012552
?DMI.BIOSInformation:
Vendor Name: Phoenix Technologies LTD
BIOS Version: R0200J3
BIOS Starting Address Segment: E6B3h
BIOS Release Date: 02/05/2007
BIOS ROM Size: 1024 KB
?Supported features:
Last edited by clear700 on 2007-7-5 at 03:10 PM ]