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. 双击之,将其写入注册表即可。

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

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

  • 相关阅读:
    多线程面试题
    Tcpdump MySQL Query
    Gossip和Redis集群原理
    mysql-table_open_cache_file_limits/
    introducing-backup-locks-percona-server-2/
    MySQL 一致性读 深入研究
    how-to-configure-mysql-masterslave-replication-with-mha-automatic-failover/
    mysqlOOM
    mysql 线程池
    Linux performance monitor tool
  • 原文地址:https://www.cnblogs.com/young233/p/11946755.html
Copyright © 2011-2022 走看看