DOS下如何以别的用户身份运行程序就是
你说的不是dos吧?应该是命令提示符,需要用runas命令,下面是用法和事例。
RUNAS USAGE:
RUNAS [/profile] [/env] [/netonly] /user: program
/profile if the user's profile needs to be loaded
/env to use current environment instead of user's。
/netonly use if the credentials specified are for remote access onl...全部
你说的不是dos吧?应该是命令提示符,需要用runas命令,下面是用法和事例。
RUNAS USAGE:
RUNAS [/profile] [/env] [/netonly] /user: program
/profile if the user's profile needs to be loaded
/env to use 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\ c"
> runas /env /user:user@ "notepad \"my file。
txt\""
NOTE: Enter user's password only when prompted。
NOTE: USER@DOMAIN is not compatible with /netonly。
比如你要用administrator运行cmd这个程序,可以这样写runas /user:机器名\administrator cmd,然后会提示输入密码。
回答:首先,把你的这个exe文件复制到你的c:\winnt\system32下面,然后在命令提示符里面输入runas /user:你的机器名\1 1然后回车,输入密码。
完成。机器名可以在命令提示符里输入hostname得到。收起