@echo off--套路(写上没坏处)
setlocal enabledelayedexpansion--变量延迟,套路(写上没坏处)
:begin--标记
tasklist /FI "imagename eq iexplore.exe">1.txt---当前进程是否有iexplore.exe,并把结果放到1.txt
echo msgbox"XX,上班时间禁止上网",,"注意">Att.vbs--生成一个VBS文件(用来提示)
find /i"iexplore.exe"<1.txt---在1.txt查找是否有iexplore.exe字符串
cls--清屏
if %errorlevel% == 0 (call Att.vbs) else (ping -n 3127.0.1>nul &gotobegin)--判断:如果有iexplore.exe字符串调用Att.vbs给出提示,如果没有延迟2秒重新上面的过程。
setlocal enabledelayedexpansion--变量延迟,套路(写上没坏处)
:begin--标记
tasklist /FI "imagename eq iexplore.exe">1.txt---当前进程是否有iexplore.exe,并把结果放到1.txt
echo msgbox"XX,上班时间禁止上网",,"注意">Att.vbs--生成一个VBS文件(用来提示)
find /i"iexplore.exe"<1.txt---在1.txt查找是否有iexplore.exe字符串
cls--清屏
if %errorlevel% == 0 (call Att.vbs) else (ping -n 3127.0.1>nul &gotobegin)--判断:如果有iexplore.exe字符串调用Att.vbs给出提示,如果没有延迟2秒重新上面的过程。
goto begin---如果判断为真,一直监视。
原文地址:http://blog.sina.com.cn/s/blog_4adc0d850100y9mg.html
本文介绍了一个简单的批处理脚本,用于检测并阻止员工在工作时间内使用Internet Explorer浏览器。通过检查运行进程来实现监控,一旦发现iexplore.exe进程即弹窗警告。
1265

被折叠的 条评论
为什么被折叠?



