如何以管理员身份运行cmd
来源:互联网 发布:12388网络举报网站 编辑:程序博客网 时间:2024/05/07 23:02
第一种方法
RUNAS USAGE:
RUNAS [ [/noprofile | /profile] [/env] [/savecred |
/user:<UserName> program
RUNAS [ [/noprofile | /profile] [/env] [/savecred] ]
/smartcard [/user:<UserName>] program
RUNAS /trustlevel:<TrustLevel> program
/noprofile specifies that the user's profi
This causes the application to
can cause some applications to
/profile specifies that the user's profi
This is the default.
/env to use current environment inst
/netonly use if the credentials specifie
access only.
/savecred to use credentials previously s
This option is not available on
Starter Editions
and will be ignored.
/smartcard use if the credentials are to b
smartcard.
/user <UserName> should be in form US
/showtrustlevels displays the trust levels that
to /trustlevel.
/trustlevel <Level> should be one of levels
in /showtrustlevels.
program command line for EXE. See below
Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %win
> runas /env /user:user@domain.microsoft.com "notepa
NOTE: Enter user's password only when prompted.
NOTE: /profile is not compatible with /netonly.
NOTE: /savecred is not compatible with /smartcard.
举例
runas /user:administrator cmd /c cmd.exe
执行上面的命令有两个前提:
1、设置了administrator的密码
计算机-->管理-->本地用户和组-->administrator->设置密码
2、没有禁用administrator用户
计算机-->管理-->本地用户和组-->administrator-->属性-->常规->勾选掉账户已禁用
第二种方法
为所要运行的命令创建快捷方式,在其属性上勾选run with full permission as an Administrator
第三种方法
直接改变所要运行的.bat或.exe属性
- 如何以管理员身份运行cmd
- 以管理员身份运行cmd
- win8系统以管理员身份运行cmd
- windows64bit 以管理员身份运行cmd命令
- 如何以管理员身份自动运行 程序
- C#如何以管理员身份运行程序
- win7如何设置以管理员身份运行
- C#如何以管理员身份运行程序
- C#如何以管理员身份运行程序
- C#如何以管理员身份运行程序
- 如何自动以管理员身份运行程序
- 如何以管理员身份运行Dos窗口
- C#如何以管理员身份运行程序
- C#如何以管理员身份运行程序
- C#如何调用以管理员身份运行的cmd命令提示符
- C#如何调用以管理员身份运行的cmd命令提示符
- C#如何调用以管理员身份运行的cmd命令提示符
- C#如何调用以管理员身份运行的cmd命令提示符
- OpenCV学习笔记(10):查看MAT对象的数据的三种方法
- poj 1979 dfs水题
- PHP OPENSSL 函数手册翻译备查 -- openssl_pkey_get_public
- C++文件读写详解(ofstream,ifstream,fstream)
- lintcode:Ugly Number
- 如何以管理员身份运行cmd
- 并查集----Wireless Network
- stm32_systick
- 常用xsd汇总
- 浅谈MVP实现Android应用层开发
- 设计模式之PHP项目应用——前言
- jQuery旋转插件jquery.rotate.js 让图片旋转
- Android图片资源处理
- setiosflags的一些用法