zoukankan      html  css  js  c++  java
  • windows添加“以管理员身份运行”

    方法:

    1. 新建一个txt文件,命名为"admin.txt",记得打开“显示后缀名”,要求看到.txt并可修改之。

    2. 将下列代码粘贴进去。

      Windows Registry Editor Version 5.00
      [HKEY_CLASSES_ROOT*shell
      unas]@="管理员取得所有权""NoWorkingDirectory"=""
      [HKEY_CLASSES_ROOT*shell
      unascommand]@="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_ROOTexefileshell
      unas2]@="管理员取得所有权""NoWorkingDirectory"=""
      [HKEY_CLASSES_ROOTexefileshell
      unas2command]@="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_ROOTDirectoryshell
      unas]@="管理员取得所有权""NoWorkingDirectory"=""
      [HKEY_CLASSES_ROOTDirectoryshell
      unascommand]@="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"
      
      
    3. 保存为"admin.reg",准备写入注册表。

    4. 双击之,将其写入注册表即可。

    效果:再次右键点击某文件的时候,就会发现菜单栏里多了一项“管理员取得所有权”,我们的目的也就达到了。

    后记:以前每次装机后,都会百度这对代码,现在还是记录一下吧,不然也麻烦。

  • 相关阅读:
    布隆过滤器
    springboot+redis实现分布式锁
    springboot+redis实现消息队列
    工作启示文章收藏
    redis常用命令
    前方的路
    分布式系统中对cookie和session的思考
    用Markdown来写自由书籍-开源技术的方案
    Centos 7.0添加yum本地安装源
    爹地,我找到了!15个极好的Linux find命令示例
  • 原文地址:https://www.cnblogs.com/young233/p/11946755.html
Copyright © 2011-2022 走看看