无忧启动论坛

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

[分享] 一个 以SuperUser设置的 系统权限右键菜单(已更新6.1.0.0))

  [复制链接]
91#
发表于 2025-12-27 16:24:21 | 只看该作者
回复

使用道具 举报

92#
发表于 2025-12-29 10:46:30 | 只看该作者
qq8899399 发表于 2025-12-26 10:57
精简版系统 不确定,

我自己原版测试的两个系统 是 19041.6693和26200.7462 都无此问题。

PS Z:\1> powershell -ExecutionPolicy Bypass -NoProfile -Command "Add-MpPreference -ControlledFolderAccessAllowedApplications '%~dp0superUser32.exe'"
Add-MpPreference : 无法将“Add-MpPreference”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果
包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ Add-MpPreference -ControlledFolderAccessAllowedApplications '%~dp0sup ...
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Add-MpPreference:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

四条命令都这提示,精简系统的话,就不管了,右键菜单也能添加了,也能正常使用

点评

[attachimg]569828[/attachimg] 你如果用WD的话。用这个注册表吧。添加 访问限制白名单(防止有时候提示,比如访问我的文档,C盘相关目录才可能 出现。)  详情 回复 发表于 2025-12-29 11:13
回复

使用道具 举报

93#
发表于 2025-12-29 11:07:01 | 只看该作者
这个提权厉害啊。感谢。
回复

使用道具 举报

94#
 楼主| 发表于 2025-12-29 11:13:43 | 只看该作者
大漠野狼 发表于 2025-12-29 10:46
PS Z:\1> powershell -ExecutionPolicy Bypass -NoProfile -Command "Add-MpPreference -ControlledFolde ...




你如果用WD的话。用这个注册表吧。添加 访问限制白名单(防止有时候提示,比如访问我的文档,C盘相关目录才可能 出现。)
  1. Windows Registry Editor Version 5.00

  2. #右键 移除 defender 白名单设置
  3. [-HKEY_CLASSES_ROOT\*\shell\DefenderExclusion]

  4. [-HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion]

  5. [-HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion]

  6. [-HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion]

  7. #右键 增加 defender 白名单设置
  8. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion]
  9. "MUIVerb"="Microsoft Defender 白名单 设置"
  10. "Icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"
  11. "SubCommands"=""
  12. "Position"="Bottom"
  13. "SeparatorBefore"=""
  14. "SeparatorAfter"=""

  15. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell]

  16. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE001]
  17. "MUIVerb"="打开 文件夹访问限制 设置菜单"
  18. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  19. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE001\command]
  20. @="explorer windowsdefender://allowappthroughfolder"

  21. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE002]
  22. "MUIVerb"="打开 排除项 设置菜单"
  23. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  24. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE002\command]
  25. @="explorer windowsdefender://exclusions"

  26. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE003]
  27. "MUIVerb"="添加此文件 Defender 文件夹限制访问 白名单"
  28. "Icon"="imageres.dll,101"
  29. "CommandFlags"=dword:00000020

  30. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE003\command]
  31. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Add-MpPreference -ControlledFolderAccessAllowedApplications '%V'; Write-Host 文件 "%V" "已添加文件夹限制访问白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  32. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE004]
  33. "MUIVerb"="移除此文件 Defender 文件夹限制访问 白名单"
  34. "Icon"="imageres.dll,100"

  35. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE004\command]
  36. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Remove-MpPreference -ControlledFolderAccessAllowedApplications '%V'; Write-Host 文件 "%V" "已移除文件夹限制访问白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  37. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE005]
  38. "MUIVerb"="添加此文件 Defender 扫描排除项 白名单"
  39. "CommandFlags"=dword:00000020
  40. "Icon"="imageres.dll,101"

  41. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE005\command]
  42. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Add-MpPreference -ExclusionPath '%V'; Write-Host 文件 "%V" "已添加扫描排除项白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  43. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE006]
  44. "MUIVerb"="移除此文件 Defender 扫描排除项 白名单"
  45. "Icon"="imageres.dll,100"

  46. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE006\command]
  47. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Remove-MpPreference -ExclusionPath '%V'; Write-Host 文件 "%V" "已移除文件夹限制访问白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  48. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE007]
  49. "CommandFlags"=dword:00000020
  50. "MUIVerb"="添加此文件 Defender 排除进程 白名单"
  51. "Icon"="imageres.dll,101"

  52. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE007\command]
  53. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Add-MpPreference -ExclusionProcess '%V'; Write-Host 文件 "%V" "已添加进程排除白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  54. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE008]
  55. "MUIVerb"="移除此文件 Defender 排除进程 白名单"
  56. "Icon"="imageres.dll,100"

  57. [HKEY_CLASSES_ROOT\*\shell\DefenderExclusion\Shell\DE008\command]
  58. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Remove-MpPreference -ExclusionProcess '%V'; Write-Host 文件 "%V" "已移除进程排除白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  59. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion]
  60. "MUIVerb"="Microsoft Defender 白名单 设置"
  61. "Icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"
  62. "SubCommands"=""
  63. "Position"="Bottom"
  64. "SeparatorBefore"=""
  65. "SeparatorAfter"=""

  66. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE001]
  67. "MUIVerb"="打开 文件夹访问限制 设置菜单"
  68. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  69. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE001\command]
  70. @="explorer windowsdefender://allowappthroughfolder"

  71. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE002]
  72. "MUIVerb"="打开 排除项 设置菜单"
  73. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  74. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE002\command]
  75. @="explorer windowsdefender://exclusions"

  76. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE003]
  77. "Icon"="imageres.dll,101"
  78. "MUIVerb"="添加此文件夹 Defender 扫描排除项 白名单"
  79. "CommandFlags"=dword:00000020

  80. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE003\command]
  81. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Add-MpPreference -ExclusionPath '%V'; Write-Host 文件夹 "%V" "已添加扫描排除项白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  82. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE004]
  83. "Icon"="imageres.dll,100"
  84. "MUIVerb"="移除此文件夹 Defender 扫描排除项 白名单"

  85. [HKEY_CLASSES_ROOT\Directory\shell\DefenderExclusion\Shell\DE004\command]
  86. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Remove-MpPreference -ExclusionPath '%V'; Write-Host 文件夹 "%V" "已移除扫描排除项白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  87. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion]
  88. "MUIVerb"="Microsoft Defender 白名单 设置"
  89. "Icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"
  90. "SubCommands"=""
  91. "Position"="Bottom"
  92. "SeparatorBefore"=""
  93. "SeparatorAfter"=""

  94. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE001]
  95. "MUIVerb"="打开 文件夹访问限制 设置菜单"
  96. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  97. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE001\command]
  98. @="explorer windowsdefender://allowappthroughfolder"

  99. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE002]
  100. "MUIVerb"="打开 排除项 设置菜单"
  101. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  102. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE002\command]
  103. @="explorer windowsdefender://exclusions"

  104. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE003]
  105. "Icon"="imageres.dll,101"
  106. "MUIVerb"="添加此文件夹 Defender 扫描排除项 白名单"
  107. "CommandFlags"=dword:00000020

  108. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE003\command]
  109. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Add-MpPreference -ExclusionPath '%V'; Write-Host 文件夹 "%V" "已添加扫描排除项白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  110. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE004]
  111. "Icon"="imageres.dll,100"
  112. "MUIVerb"="移除此文件夹 Defender 扫描排除项 白名单"

  113. [HKEY_CLASSES_ROOT\Directory\background\shell\DefenderExclusion\Shell\DE004\command]
  114. @="powershell.exe -Command Start-Process PowerShell -ArgumentList \\"Remove-MpPreference -ExclusionPath '%V'; Write-Host 文件夹 "%V" "已移除扫描排除项白名单" -ForegroundColor Green; Write-Host "按任意键退出..." -ForegroundColor Yellow; `$null = [Console]::ReadKey(`$true); exit\\" -verb RunAs"

  115. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion]
  116. "MUIVerb"="Microsoft Defender 白名单 设置"
  117. "Icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"
  118. "SubCommands"=""
  119. "Position"="Bottom"
  120. "SeparatorBefore"=""
  121. "SeparatorAfter"=""

  122. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE001]
  123. "MUIVerb"="打开 文件夹访问限制 设置菜单"
  124. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  125. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE001\command]
  126. @="explorer windowsdefender://allowappthroughfolder"

  127. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE002]
  128. "MUIVerb"="打开 排除项 设置菜单"
  129. "icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll,-101"

  130. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE002\command]
  131. @="explorer windowsdefender://exclusions"

  132. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE003]
  133. "Icon"="imageres.dll,101"
  134. "MUIVerb"="添加此驱动器 Defender 扫描排除项 白名单"
  135. "CommandFlags"=dword:00000020

  136. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE003\command]
  137. @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start PowerShell.exe Add-MpPreference -ExclusionPath ""%1""; Write-Host 驱动器""%1"" \\"已添加扫描排除项白名单\\" -ForegroundColor Green; Write-Host \\"按任意键退出...\\" -ForegroundColor Yellow; $null = [Console]::ReadKey($true); exit'  -Verb RunAs""

  138. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE004]
  139. "Icon"="imageres.dll,100"
  140. "MUIVerb"="移除此驱动器 Defender 扫描排除项 白名单"

  141. [HKEY_CLASSES_ROOT\Drive\shell\DefenderExclusion\Shell\DE004\command]
  142. @="PowerShell -windowstyle hidden -Command "Start-Process cmd -ArgumentList '/s,/c,start PowerShell.exe Remove-MpPreference -ExclusionPath ""%1""; Write-Host 驱动器""%1"" \\"已移除扫描排除项白名单\\" -ForegroundColor Green; Write-Host \\"按任意键退出...\\" -ForegroundColor Yellow; $null = [Console]::ReadKey($true); exit'  -Verb RunAs""
复制代码


回复

使用道具 举报

95#
发表于 2025-12-30 09:10:54 | 只看该作者
qq8899399 发表于 2025-12-26 10:57
精简版系统 不确定,

我自己原版测试的两个系统 是 19041.6693和26200.7462 都无此问题。

谢谢,这系统WD也是被精简掉的,虽然有提示,但右键权限也能正常运行启用
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2026-1-9 03:02

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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