PSExec运行远程批处理文件 [英] PSExec run remote batch file

查看:479
本文介绍了PSExec运行远程批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用PSExec远程运行批处理文件,所以我的代码如下:

I wanna run remote a batch file with PSExec, so my code looks like this:

cd C:\PsTools
PsExec.exe \\<computer> -u <user> -p <password> -s -i <"pathToBatchFile\batch.bat">  
exit

调用远程计算机上的批处理文件后,远程计算机上的应用程序将以SYSTEM帐户启动.我想在另一个帐户下启动它.

After I call the batch file on the remote computer, the application on the remote computer is starting under the SYSTEM account. I wanna start it under another account.

我该怎么做?

推荐答案

您不应使用-s开关.

文档:

-s在系统帐户中运行远程进程.

-s Run remote process in the System account.

这篇关于PSExec运行远程批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆