运行另一台计算机上的程序,runas(以其他身份在另一台计算机上执行程序)_语法_示例_MSDOS命令_uc电脑园官网...

Windows Vista and later syntax

RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ] /user:program

RUNAS [ [/noprofile | /profile] [/env] [/savecred] ] /smartcard [/user:] program

RUNAS /trustlevel:program

/noprofile

Specifies that the user's profile should not be loaded, which allows the application to load more quickly, but can cause some applications to malfunction.

/profile

The default setting that specifies that the user's profile should be loaded.

/env

Use the current environment instead of the user's.

/netonly

Use if the credentials specified are for remote access only.

/savecred

Use credentials previously saved by the user.

/smartcard

Use if the credentials are to be supplied from a smartcard.

/user

should be in form USER@DOMAIN or DOMAIN\USER

/showtrustlevels

Displays the trust levels that can be used as arguments to /trustlevel.

/trustlevel

should be one of the levels enumerated in /showtrustlevels.

program

Command line for EXE. See below for examples.

Examples

> runas /noprofile /user:mymachine\administrator cmd

> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"

> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

Note

Enter a user's password only when prompted.

Note

The switch /profile is not compatible with /netonly.

Note

The switch /savecred is not compatible with /smartcard.

Windows XP and earlier syntax

RUNAS [/profile] [/env] [/netonly] /user:program

/profile

Use if the user's profile needs to be loaded.

/env

Use the current environment instead of user's.

/netonly

Use if the credentials specified are for remote access only.

/user

should be in form USER@DOMAIN or DOMAIN\USER.

program

Command line for EXE. See below for examples.

Examples

> runas /profile /user:mymachine\administrator cmd

> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"

> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

Note

Enter user's password only when prompted.

Note

USER@DOMAIN is not compatible with /netonly.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值