在桌面上新建一个txt文件,粘贴如下内容到txt中:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT*shell unas] @="管理员授权" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT*shell unascommand] @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" [HKEY_CLASSES_ROOTexefileshell unas2] @="管理员授权" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTexefileshell unas2command] @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" [HKEY_CLASSES_ROOTDirectoryshell unas] @="管理员授权" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDirectoryshell unascommand] @="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t" "IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t"
点击另存为取名为“管理员授权.reg”,然后双击,在接下来的弹框里面点击“是”
然后会有另一个弹框
然后我们找到要删除的文件夹,右键选择“管理员授权”,接下来就可以正常删除操作了。
参考链接:https://jingyan.baidu.com/article/3a2f7c2e69294526afd61183.html