无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 5096|回复: 14
打印 上一主题 下一主题

[分享] 右键加入“管理员取得所有权”选项

[复制链接]
跳转到指定楼层
1#
发表于 2020-12-27 11:05:52 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
右键加入管理员取得所有权选项

有些软件爱好者制作的优化精简版WIN10、WIN8.1系统里,点击文件或文件夹时,鼠标右键里可能没有管理员取得所有权选项,如果要打开的是系统文件夹,此时会遭拒绝。为解决这个问题,弄了一个右键加入管理员取得所有权选项的注册表文件,现与大家分享。

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"



2#
发表于 2020-12-27 11:50:08 | 只看该作者
用“右键管家”很方便
回复

使用道具 举报

3#
 楼主| 发表于 2020-12-27 11:53:02 | 只看该作者
本帖最后由 aoyabing 于 2020-12-27 11:54 编辑
asd2588 发表于 2020-12-27 11:50
用“右键管家”很方便

是的,更方便些
回复

使用道具 举报

4#
发表于 2020-12-27 12:04:33 来自手机 | 只看该作者
如何使用
回复

使用道具 举报

5#
发表于 2020-12-27 12:19:05 | 只看该作者
WIN7以上系统与软件兼容问题,有些操作没有管理员取得所有权,运行会出现问题。
回复

使用道具 举报

6#
发表于 2020-12-27 12:33:11 来自手机 | 只看该作者
学习了
回复

使用道具 举报

7#
 楼主| 发表于 2020-12-27 12:54:18 | 只看该作者
本帖最后由 aoyabing 于 2020-12-27 13:10 编辑

复制粘贴到文本文件里,保存并命名如2.TXT,改扩展名TXT为REG,双击2.REG,选择导入即可。

用右键管家也可以解决!!!如下图。





回复

使用道具 举报

8#
发表于 2020-12-27 13:31:18 | 只看该作者
右键管家
回复

使用道具 举报

9#
发表于 2020-12-27 13:58:42 | 只看该作者
本帖最后由 zhxy9804 于 2020-12-27 14:00 编辑

你这个是不对,也不全的
我做的这个覆盖好,没有bug,win7-win10系统通用.文件文件夹也通吃.
  1. Windows Registry Editor Version 5.00

  2. [HKEY_CLASSES_ROOT\*\shell\runas]
  3. @="管理员取得所有权"
  4. "Icon"="%windir%\\system32\\shell32.dll,111"
  5. "NoWorkingDirectory"=""

  6. [HKEY_CLASSES_ROOT\*\shell\runas\command]
  7. @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
  8. "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"

  9. [HKEY_CLASSES_ROOT\batfile\shell\runas2]
  10. @="管理员取得所有权"
  11. "Icon"="%windir%\\system32\\shell32.dll,111"
  12. "NoWorkingDirectory"=""

  13. [HKEY_CLASSES_ROOT\batfile\shell\runas2\command]
  14. @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
  15. "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"

  16. [HKEY_CLASSES_ROOT\cmdfile\shell\runas2]
  17. @="管理员取得所有权"
  18. "Icon"="%windir%\\system32\\shell32.dll,111"
  19. "NoWorkingDirectory"=""

  20. [HKEY_CLASSES_ROOT\cmdfile\shell\runas2\command]
  21. @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
  22. "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"

  23. [HKEY_CLASSES_ROOT\exefile\shell\runas2]
  24. @="管理员取得所有权"
  25. "Icon"="%windir%\\system32\\shell32.dll,111"
  26. "NoWorkingDirectory"=""

  27. [HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
  28. @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
  29. "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"

  30. [HKEY_CLASSES_ROOT\Folder\shell\runas2]
  31. @="管理员取得所有权"
  32. "Icon"="%windir%\\system32\\shell32.dll,111"
  33. "NoWorkingDirectory"=""

  34. [HKEY_CLASSES_ROOT\Folder\shell\runas2\command]
  35. @="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t"
  36. "IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t"

  37. [-HKEY_CLASSES_ROOT\Directory\shell\runas]
复制代码


评分

参与人数 1无忧币 +5 收起 理由
yynq + 5 赞一个!

查看全部评分

回复

使用道具 举报

10#
发表于 2020-12-27 15:08:57 | 只看该作者
学习了
回复

使用道具 举报

11#
 楼主| 发表于 2020-12-27 15:55:13 | 只看该作者
本帖最后由 aoyabing 于 2020-12-27 16:10 编辑
zhxy9804 发表于 2020-12-27 13:58
你这个是不对,也不全的
我做的这个覆盖好,没有bug,win7-win10系统通用.文件文件夹也通吃.

谢谢版主纠错!但你的导入后,我的电脑、回收站右键里都多了“管理员取得所有权”,能否更完善一下?
回复

使用道具 举报

12#
发表于 2020-12-27 17:49:27 | 只看该作者
谢谢大佬的分享
回复

使用道具 举报

13#
发表于 2020-12-27 17:58:43 | 只看该作者
aoyabing 发表于 2020-12-27 15:55
谢谢版主纠错!但你的导入后,我的电脑、回收站右键里都多了“管理员取得所有权”,能否更完善一下?

这个目前只能这样子,就跟命令提示符一样,无伤大雅
必须folder,不能directory,
回复

使用道具 举报

14#
发表于 2020-12-27 19:19:22 | 只看该作者
用了,怎么右键上显示乱码?求解。
回复

使用道具 举报

15#
发表于 2020-12-27 21:28:48 | 只看该作者
zhxy9804 发表于 2020-12-27 13:58
你这个是不对,也不全的
我做的这个覆盖好,没有bug,win7-win10系统通用.文件文件夹也通吃.


用完你的右键出乱码了

回复

使用道具 举报

16#
发表于 2020-12-27 21:30:39 | 只看该作者
2012xuchyou 发表于 2020-12-27 19:19
用了,怎么右键上显示乱码?求解。

我和你一样,用完了右键是乱码。
回复

使用道具 举报

17#
 楼主| 发表于 2020-12-27 21:42:21 | 只看该作者
本帖最后由 aoyabing 于 2020-12-27 21:47 编辑
2012xuchyou 发表于 2020-12-27 19:19
用了,怎么右键上显示乱码?求解。

谢谢反馈,建议用右键管家解决,见下图。WIN10会出现。WIN8.1正常。试试下面的
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\Shell\TakeAuthority]
"icon"="\"C:\\windows\\system32\\SHELL32.dll,160\""
@="管理员取得所有权"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\Shell\TakeAuthority\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\TakeAuthority]
"icon"="\"C:\\windows\\system32\\SHELL32.dll,160\""
@="管理员取得所有权"

[HKEY_CLASSES_ROOT\exefile\shell\TakeAuthority\Command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
"icon"="\"C:\\windows\\system32\\SHELL32.dll,160\""
"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]
@="管理员取得所有权"
"NoWorkingDirectory"=""
"icon"="C:\\Windows\\system32\\SHELL32.dll,170"

[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"=""
"icon"="C:\\Windows\\system32\\SHELL32.dll,170"

[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"=""
"icon"="C:\\Windows\\system32\\SHELL32.dll,170"

[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"





回复

使用道具 举报

18#
发表于 2020-12-31 11:09:30 | 只看该作者
感謝樓主分享,剛好正需要呢!
回复

使用道具 举报

19#
发表于 2020-12-31 16:31:04 | 只看该作者
aoyabing 发表于 2020-12-27 21:42
谢谢反馈,建议用右键管家解决,见下图。WIN10会出现。WIN8.1正常。试试下面的
Windows Registry Editor ...

以下供參考:
我的也是如此,在 Win10 底下,
我將"管理員取得所有權"這幾個字,全部尋找/取代成繁體,簡體系統類推。
在 Notepad 儲存時,將編碼改成 ANSY 再儲存
回复

使用道具 举报

20#
发表于 2020-12-31 17:24:38 | 只看该作者
看来不错,一定用得上
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-5-12 15:51

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表