2345技术员联盟

利用注册表获取Win8管理员权限

  • 来源:www.it892.com 原创
  • 时间:2014-11-28
  • 阅读:
  • 本文标签:win8管理员权限

新建记事本将下面的代码复制并保存,将记事本文件扩展名改为.reg。双击这个文件导入注册表,导入前会有提示让你选择,点【是】。导入进去之后,右击你要取得权限的文件夹,鼠标右键菜单中选择【管理员权限】即可。

当然了,你也可以恢复成默认权限,此时在右键菜单中选择恢复原始权限就行了。

1、取得管理员权限

  1. Windows Registry Editor Version 5.00;取得文件修改权限 
  2. [HKEY_CLASSES_ROOT*shellrunas] 
  3. @="管理员权限" 
  4. "Icon"="C:\Windows\System32\imageres.dll,102" 
  5. "NoWorkingDirectory"="" 
  6. [HKEY_CLASSES_ROOT*shellrunascommand] 
  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_ROOTexefileshellrunas2] 
  10. @="管理员权限" 
  11. "Icon"="C:\Windows\System32\imageres.dll,102" 
  12. "NoWorkingDirectory"="" 
  13. [HKEY_CLASSES_ROOTexefileshellrunas2command] 
  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_ROOTDirectoryshellrunas] 
  17. @="管理员权限" 
  18. "Icon"="C:\Windows\System32\imageres.dll,102" 
  19. "NoWorkingDirectory"="" 
  20. [HKEY_CLASSES_ROOTDirectoryshellrunascommand] 
  21. @="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t" 
  22. "IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t" 

2、恢复原始权限:

  1. Windows Registry Editor Version 5.00 
  2. ;恢复原始权限 
  3. [HKEY_CLASSES_ROOT*shellrunas-] 
  4. @="恢复原始权限" 
  5. "Icon"="C:\Windows\System32\imageres.dll,101" 
  6. "NoWorkingDirectory"=""; && takeown /f "%1" 
  7. [HKEY_CLASSES_ROOT*shellrunas-command] 
  8. @="cmd.exe /c takeown /f "%1" && icacls "%1" /reset && cacls "%1" /e /r "%%USERNAME%%"" 
  9. "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /reset && cacls "%1" /e /r "%%USERNAME%%"" 
  10. [HKEY_CLASSES_ROOTexefileshellrunas2-] 
  11. @="恢复原始权限" 
  12. "Icon"="C:\Windows\System32\imageres.dll,101" 
  13. "NoWorkingDirectory"="" 
  14. [HKEY_CLASSES_ROOTexefileshellrunas2-command] 
  15. @="cmd.exe /c takeown /f "%1" && icacls "%1" /reset && cacls "%1" /e /r "%%USERNAME%%"" 
  16. "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /reset && cacls "%1" /e /r "%%USERNAME%%"" 
  17. [HKEY_CLASSES_ROOTDirectoryshellrunas-] 
  18. @="恢复原始权限" 
  19. "Icon"="C:\Windows\System32\imageres.dll,101" 
  20. "NoWorkingDirectory"="" 
  21. [HKEY_CLASSES_ROOTDirectoryshellrunas-command] 
  22. @="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /reset && cacls "%1" /e /r "%%USERNAME%%"" 
  23. "IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /reset && cacls "%1" /e /r "%%USERNAME%%"" 
本文来自电脑技术网www.it892.com),转载本文请注明来源.
本文链接:http://www.it892.com/content/system/Windows_8/20141128/5699.html
热点排行
无觅相关文章插件,快速提升流量