7 Star 19 Fork 9

小李 / RunAsAdministrator

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

RunAsAdministrator

一个用于简化右键菜单以管理员身份运行功能的辅助程序,使程序能直接双击向系统请求提权。

说明

参数说明

  • -env 将此程序加入系统目录(system32)下,以在任意地方通过命令行执行 asadmin app.exe args
  • -run 直接执行程序
  • -dir 指定工作目录
  • -args 配置 -run 一起使用,作为执行程序的参数,多个参数使用引号 " 包含

不传任何开关参数时,命令被识别为创建快捷方式,会自动在系统桌面上创建快捷方式(如果是快捷方式,直接替换原来的快捷方式)。也可以直接将程序拖放到 asadmin.exe 上以实现相同的效果。

注意:当目录路径包含空格或目标程序需要参数时,需要使用引号("")将其包围

示例

asadmin.exe -run C:\Windows\notepad.exe
asadmin.exe -run D:\test.txt
asadmin.exe -run "C:\Windows\System32\cmd.exe /C /Q"

在执行了 asadmin.exe -env 后,可以在系统任意位置执行 asadmin app.exe args

MIT License Copyright (c) 2019 hyjiacan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

使用C#编写的小工具,以管理员身份运行指定程序。可以直接将目标程序拖到此程序上自动生成快捷方式,也可以拖动创建快捷方式然后添加运行参数。 展开 收起
C#
MIT
取消

发行版 (2)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/hyjiacan/RunAsAdministrator.git
git@gitee.com:hyjiacan/RunAsAdministrator.git
hyjiacan
RunAsAdministrator
RunAsAdministrator
master

搜索帮助