用bat中的takeown和icacls命令写一个提权CWindowsexplorerexe文件并且结束explorer进程然后删除该文件的文件
以下是提权C:\Windows\explorer.exe文件,并且结束explorer进程然后删除该文件的文件的bat脚本:
@echo off
echo Taking ownership of C:\Windows\explorer.exe...
takeown /f C:\Windows\explorer.exe
echo Granting full control to current user...
icacls C:\Windows\explorer.exe /grant %USERNAME%:(F)
echo Ending explorer.exe process...
taskkill /f /im explorer.exe
echo Deleting explorer.exe file...
del C:\Windows\explorer.exe
echo Done.
请注意,这个脚本需要在管理员权限下运行。它将采取所有者和权限控制,结束explorer.exe进程,然后删除C:\Windows\explorer.exe文件。这将会导致Windows桌面图标和任务栏不可用,直到重新启动explorer.exe进程。请谨慎使用此脚本。
原文地址: https://www.cveoy.top/t/topic/ba8A 著作权归作者所有。请勿转载和采集!