: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的内容是如下我用红色表表示我要取得的内容
哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪[compiled@15.03.2004]哪?
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
?Add-on BIOS detected:
Intel Corp.
Located @C50000
Init Entry Point @C5E45F
Size 64kb
[ Last edited by clear700 on 2007-7-5 at 03:10 PM ]作者: Climbing 时间: 2007-7-5 09:01 多看看老帖子,对照着for /?学习。作者: clear700 时间: 2007-7-5 12:59 看的头都晕了
我把这行改了怎么就不工作呢?
For /f "tokens=2 delims==" %%i In ('findstr /bi "Product Name" DMIINFO.TXT') do set type=%%i