[ Last edited by mmh1 on 2009-4-13 at 22:48 ]作者: deaniqpl 时间: 2009-4-13 22:46 沙发顶一个,也正学习中。作者: mmh1 时间: 2009-4-13 22:49 @echo off
color 5f
tasklist>1.txt
cls
findstr "explorer" 1.txt>2.txt
taskkill /f /im explorer.exe
cls
ping /n 4 127.1>nul
for /f %%i in (2.txt) do start %%i
这个例子里的findstr可以用作者: 不得不爱 时间: 2009-4-13 23:06 应该是与findstr所支持的文件编码有关
wmic process get executablepath>1.txt回产生unicode格式的文件,而findstr不能正常处理引起的.
wmic process get executablepath>1.txt
type 1.txt|findstr/i "explorer.exe" >2.txt
这样就可以了
[ Last edited by 不得不爱 on 2009-4-13 at 23:08 ]作者: mmh1 时间: 2009-4-13 23:17 原来是这样,我先试试作者: mmh1 时间: 2009-4-13 23:18 可以用,谢谢了!!作者: everest79 时间: 2009-4-14 04:47 1
wmic process where name='explorer.exe' get executablepath
2
type 1.txt|findstr /i "explorer.exe"作者: echoair 时间: 2009-11-11 13:09 type的用法…