给右键添加管理员权限菜单
下面内容保存为xxx.reg文件,双击导入注册表。
Windows Registry Editor Version 5.00
;右键添加管理员
[HKEY_CLASSES_ROOT\*\shell\runas]
@="管理员取得所有权"
"NoWorkingDirectory"=""
"Icon"="%SystemRoot%\\System32\\shell32.dll,244"
[HKEY_CLASSES_ROOT\*\shell\runas\Command]
@="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_ROOT\Directory\shell\runas]
@="管理员取得所有权"
"Icon"="%SystemRoot%\\System32\\shell32.dll,244"
[HKEY_CLASSES_ROOT\Directory\shell\runas\Command]
@="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"
[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="管理员取得所有权"
"Icon"="%SystemRoot%\\System32\\shell32.dll,244"
[HKEY_CLASSES_ROOT\Drive\shell\runas\Command]
@="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"
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\runas]
@="管理员取得所有权"
"Icon"="%SystemRoot%\\System32\\shell32.dll,244"
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\runas\Command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\runas]
@="管理员取得所有权"
"Icon"="%SystemRoot%\\System32\\shell32.dll,244"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\runas\Command]
@="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"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\shell\runas]
@="管理员取得所有权"
"Icon"="%SystemRoot%\\System32\\shell32.dll,244"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Drive\shell\runas\Command]
@="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"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\TakeAuthority]
@="管理员取得所有权"
"Icon"="%SystemRoot%\\System32\\shell32.dll,244"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\TakeAuthority\Command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
也可以用火绒等工具的文件删除功能。