禁用或启用任务管理器

执行命令前确认当前用户在管理员组里

以管理员权限启动命令提示符cmd,

在命令提示符cmd里, 执行以下命令禁用任务管理器

reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableTaskMgr /t reg_dword /d "1" /f

在命令提示符cmd里, 执行以下命令启用任务管理器

reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system" /f

vbs禁用任务管理器

复制代码
Set shell = CreateObject("wscript.shell")
Do
shell.Run "cmd /c taskkill /f /im taskmgr.exe",vbHide'杀死taskmgr进程
WScript.Sleep 500 '每0.5秒执行一次
Loop

bat脚本

复制代码
@echo off
if "%1"=="hide" goto CmdBegin
start mshta vbscript:createobject("wscript.shell").run("""%~0"" hide",0)(window.close)&&exit
:CmdBegin
:: 检查是否以管理员权限运行
net session >nul 2>&1
if %errorlevel% neq 0 (
    echo 请求管理员权限...
    PowerShell -Command "Start-Process '%~dpnx0' -Verb RunAs"
    exit /b
)

:: 以下是你的实际批处理命令
:loop
taskkill /F /IM Taskmgr.exe
set /a num+=1
if %num% lss 1000000 goto :loop
:: 在这里添加你的实际命令
pause

该程序的操作实际是开启后挂在后台循环100万次 kill掉taskmgr.exe的命令的bat脚本

相关推荐
2601_962364972 小时前
重装系统后,Windows Hello 为什么要重新录入人脸?
windows·安全·电脑
水饺编程2 小时前
第5章,[Win32 章节] :在平面直角坐标系中描点
c语言·c++·windows·visual studio
三玖诶4 小时前
DeepSeek Launcher:内置 Node.js,为什么首次启动仍需要网络?
windows·开源·deepseek
陈天伟教授4 小时前
具身数据采集黑话(4)
人工智能·windows·具身智能
无巧不成书02184 小时前
Apache Tomcat 9 下载全指南(Windows,Linux,macOS):版本选型、国内镜像、SHA-512 与 PGP 完整性校验
windows·tomcat·apache
3Q工具箱 - BraggTroy5 小时前
Python + PyInstaller 实战:从零打造 10 个 Windows 桌面小工具(附全部踩坑记录与核心代码)
开发语言·windows·python
linnux领域5 小时前
eNSP 交换机与电脑不在一个网段?用一台 Windows 双网卡做路由,把实验环境彻底打通
windows·华为·电脑·ensp·静态路由·网络实验·ensp模拟器
挂科边缘5 小时前
Android Studio 保姆级安装教程,Windows 电脑上安装 Android Studio
android·windows·android studio
TechExplorer3656 小时前
Win11 必要禁用的服务以释放进程内存
windows
江湖人称菠萝包6 小时前
【Windows】《深入浅出Windows API程序设计:核心编程篇》笔记-Chapter5-剪贴板
windows·笔记