win7右键如何添加权限
- 提问者网友:幽瑟玉琼情殇
- 2021-03-13 15:08
- 二级知识专家网友:佛说妍妍很渣
- 2021-03-13 16:42
复制以下代码到记事本:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\runas]
@="管理员取得所有权"
"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]
@="管理员取得所有权"
"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]
@="管理员取得所有权"
"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"
点击记事本上方的 文件--另存为
文件名“管理员取得所有权.reg”,
保存类型选择所有文件(展开那个倒三角就会看到“所有文件”)。
最后双击这个文件导入。
- 1楼网友:青灯壁纸妹
- 2021-03-13 18:26
- 2楼网友:爱情是怎么炼成的
- 2021-03-13 17:52
--------------------------------------------------------------------------------
———————————————————————————————————————————————
windows registry editor version 5.00
[hkey_classes_root\*\shell\runas] @="管理员取得所有权" "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] @="管理员取得所有权" "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] @="管理员取得所有权" "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]
[-hkey_classes_root\exefile\shell\runas2]
[-hkey_classes_root\directory\shell\runas]