Board logo

标题: [文件操作] 批处理如何重新加载explorer.exe的命令? [打印本页]

作者: temp    时间: 2009-11-22 11:47     标题: 批处理如何重新加载explorer.exe的命令?

  1. taskkill.exe /f /im explorer.exe
  2. start explorer.exe
复制代码

可以重新加载explorer.exe
  1. taskkill.exe /f /im explorer.exe /t
  2. start explorer.exe
复制代码

多了一个/t,只能用任务管理器-》新建任务来重新加载explorer.exe,请教taskkill.exe /f /im explorer.exe /t后如何重新加载explorer.exe?
谢谢!
作者: cjiabing    时间: 2009-11-22 11:55

这样就可以了:
tskill explorer
taskkill /f /im explorer.exe
看:http://www.bathome.net/thread-3420-1-1.html
好像不用start,他就自动重新加载 explorer.exe了。

[ 本帖最后由 cjiabing 于 2009-11-22 12:11 编辑 ]
作者: temp    时间: 2009-11-22 12:28

原帖由 cjiabing 于 2009-11-22 11:55 发表
这样就可以了:
tskill explorer
taskkill /f /im explorer.exe
看:http://www.bathome.net/thread-3420-1-1.html
好像不用start,他就自动重新加载 explorer.exe了。

谢谢!
我的用法如下,不加/t无法删除u盘(批处理是在u盘中运行的):
  1. taskkill.exe /f /im explorer.exe /t || ntsd -c q -pn explorer.exe
  2. RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
  3. start explorer.exe
  4. @for /f %%i in ('devcon findall usb*^|find /i "usb mass storage"') do devcon remove "@%%i"
复制代码

作者: cjiabing    时间: 2009-11-22 12:32

taskkill.exe??????
不懂你的意思,explorer.exe不是系统的吗,在连接主机的U盘运行对explorer.exe也算一样的吧?
作者: temp    时间: 2009-11-22 12:39

原帖由 cjiabing 于 2009-11-22 12:32 发表
taskkill.exe??????
不懂你的意思,explorer.exe不是系统的吗,在连接主机的U盘运行对explorer.exe也算一样的吧?

朋友!谢谢你,帮忙测试修改一下吧

[ 本帖最后由 temp 于 2009-11-23 11:40 编辑 ]
作者: temp    时间: 2009-11-22 12:47

  1. echo taskkill.exe /f /im explorer.exe /t>%temp%\abc.bat
  2. echo start explorer.exe>>%temp%\abc.bat
  3. call %temp%\abc.bat
复制代码
只能用新建任务来重新加载explorer.exe,如何才能用命令的方式重新加载explorer.exe呢?

[ 本帖最后由 temp 于 2009-11-24 13:39 编辑 ]




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2