• Win右键管理员权限的获取


     1 Windows Registry Editor Version 5.00
     2 
     3 ;取得文件修改权限  
     4 
     5 [HKEY_CLASSES_ROOT*shell
    unas]  
     6 
     7 @="管理员权限"
     8 
     9 "Icon"="C:\Windows\System32\imageres.dll,102"
    10 
    11 "NoWorkingDirectory"=""
    12 
    13 [HKEY_CLASSES_ROOT*shell
    unascommand]  
    14 
    15 @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
    16 
    17 "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
    18 
    19 [HKEY_CLASSES_ROOTexefileshell
    unas2]  
    20 
    21 @="管理员权限"
    22 
    23 "Icon"="C:\Windows\System32\imageres.dll,102"
    24 
    25 "NoWorkingDirectory"=""
    26 
    27 [HKEY_CLASSES_ROOTexefileshell
    unas2command]  
    28 
    29 @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
    30 
    31 "IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F"
    32 
    33 [HKEY_CLASSES_ROOTDirectoryshell
    unas]  
    34 
    35 @="管理员权限"
    36 
    37 "Icon"="C:\Windows\System32\imageres.dll,102"
    38 
    39 "NoWorkingDirectory"=""
    40 
    41 [HKEY_CLASSES_ROOTDirectoryshell
    unascommand]  
    42 
    43 @="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t"
    44 
    45 "IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1" /grant administrators:F /t"

    将上面的代码保存在reg格式,然后执行添加到注册列表

  • 相关阅读:
    开发软件设计模型 visual studio UML
    to debug asp.net mvc4
    BeeFramework
    .net entity framework 泛型 更新与增加记录
    javascript debut trick, using the throw to make a interrupt(breakpoint) in your program
    C# dynamic
    webapi
    C# async / await
    NYoj 613 免费馅饼
    洛谷P1056:排座椅(贪心)
  • 原文地址:https://www.cnblogs.com/sherrykid/p/5705647.html
Copyright © 2020-2023  润新知