您的位置:首页 > 其它

win8获得最高管理员权限复制删除无法删除文件

2014-02-15 16:49 288 查看
新建一个记事本,把下面的代码复制进去,然后把文件后缀名改为.reg,双击运行即可取得管理员权限

添加管理员权限:

Windows Registry Editor Version 5.00
;取得文件修改权限
[HKEY_CLASSES_ROOT\*\shell\runas]
@="管理员权限"
"Icon"="C:\\Windows\\System32\\imageres.dll,102"
"NoWorkingDirectory"=""
[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\exefile\shell\runas2]
@="管理员权限"
"Icon"="C:\\Windows\\System32\\imageres.dll,102"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\exefile\shell\runas2\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"="C:\\Windows\\System32\\imageres.dll,102"
"NoWorkingDirectory"=""
[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"


添加恢复管理员权限:

Windows Registry Editor Version 5.00
;恢复原始权限
[HKEY_CLASSES_ROOT\*\shell\runas-]
@="恢复原始权限"
"Icon"="C:\\Windows\\System32\\imageres.dll,101"
"NoWorkingDirectory"=""
; && takeown /f \"%1\"
[HKEY_CLASSES_ROOT\*\shell\runas-\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
[HKEY_CLASSES_ROOT\exefile\shell\runas2-]
@="恢复原始权限"
"Icon"="C:\\Windows\\System32\\imageres.dll,101"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\exefile\shell\runas2-\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
[HKEY_CLASSES_ROOT\Directory\shell\runas-]
@="恢复原始权限"
"Icon"="C:\\Windows\\System32\\imageres.dll,101"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas-\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""


在双击运行这两个文件后,会自动把我们需要的功能注入到注册表里,然后右键菜单就会出现一个管理员权限和一个恢复原始权限的选项

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐