简体   繁体   English

如何从管理命令提示符启动我的exe文件

[英]How to initiate my exe file from administrative command prompt

I have logged in with one user in my system. 我已经在系统中以一个用户身份登录。 Like, userA. 就像,userA。 Now, I have opened command prompt window with administrator privileges. 现在,我以管理员权限打开了命令提示符窗口。 In same Administrator command prompt window need to run my EXE file for userA without the password. 在同一管理员命令提示符窗口中,无需密码即可为userA运行我的EXE文件。

I have tried "RunAs" command but it will ask for Password. 我已经尝试过“ RunAs”命令,但会要求输入密码。

Is there any other alternative, where I can solve my problem. 还有其他选择可以解决我的问题吗?

I have logged in with one user in my system. 我已经在系统中以一个用户身份登录。 Like, userA. 就像,userA。

Ok... 好...

In same Administrator command prompt window need to run my EXE file for userA without the password. 在同一管理员命令提示符窗口中,无需密码即可为userA运行我的EXE文件。

So you are already logged in as userA why would you need to enter the passsword again? 因此,您已经以userA身份登录,为什么还要再次输入密码?

If you need to run something as as a different user you can create a batch file and set up a scheduled task to run it with their credentials, but don't actually give it a schedule. 如果您需要以其他用户身份运行某些文件,则可以创建一个批处理文件并设置一个计划的任务以使用其凭据运行该文件,但实际上并没有给它一个计划。 When you are then logged in as a differnt user you can call the scheduled task and it will run as the user it is associated with. 然后,您以其他用户身份登录时,可以调用计划的任务,该任务将以与其关联的用户身份运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM