您当前的位置:首页 > 计算机 > 编程开发 > DOS/BAT与(脚本)

分享一个10秒自动结束进程的bat

时间:08-12来源:作者:点击数:

分享一个10秒自动结束进程的bat

不支持空格中文字符的文件夹

之前用zTasker 总是会卡一下鼠标。

在管理工具里面导入计划任务,开机运行。

https://pan.baidu.com/s/1LIo2nqIWAtYYW4prcCIzTA?pwd=a3yi 提取码: a3yi

lanzoub 商业网/b01390hnpa

密码:4x3v

123912 商业网/s/gZp9jv-DF7d3

@echo off
 
:loop
 
tasklist /fi "imagename eq sesvr.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im sesvr.exe
)
 
tasklist /fi "imagename eq sesvcr.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im sesvcr.exe
)
 
tasklist /fi "imagename eq sesvc.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im sesvc.exe
)
 
tasklist /fi "imagename eq SeAppService.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im SeAppService.exe
)
 
tasklist /fi "imagename eq 360bdoctor.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im 360bdoctor.exe
)
 
tasklist /fi "imagename eq MultiTip.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im MultiTip.exe
)
 
tasklist /fi "imagename eq webapp.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im webapp.exe
)
 
 
 
 
timeout /t 10
goto loop
set ws=createobject("wscript.shell")
 
rem 新建一个脚本对象
 
ws.run "D:\ProgramData\Shut\Shut_down.bat",0
 
rem 执行rar.bat文件,后面的0代表运行该bat文件时不显示dos窗口

也可以关闭指定进程

tasklist /fi "imagename eq sesvr.exe" > nul
if %errorlevel% equ 0 (
  taskkill /f /im sesvr.exe
)

 

方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐