方法如下:
1、鼠标右击win7系统电脑桌面空白处,新建一个记事本文档(txt文件),复制如下内容:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT*shellrunas]
@="管理员取得所有权"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT*shellrunascommand]
@="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_ROOTexefileshellrunas2]
@="管理员取得所有权"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTexefileshellrunas2command]
@="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_ROOTDirectoryshellrunas]
@="管理员取得所有权"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand]
@="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"
2、保存该记事本文档,将后缀名.txt改为.reg;
3、鼠标双击此.reg,向注册表写入信息;
4、鼠标右击该文件,这时候多了一行“管理员取得所有权”,点击就能取得文件的所有权限了。