cmd - psexec 给系统找不到指定的文件

标签 cmd remote-desktop psexec

我正在尝试从我的 win7 CMD(作为管理员)运行它:

psexec IpAddress -u domain\user -p pword c:\Autobatch\ClientJobSender.exe http://reportserver.net:8070/JobExecutor.asmx c:\AutoBatch\backup\trigger.xml

但我收到“系统找不到指定的文件”错误。

我也试过这样:
psexec IpAddress -u domain\user -p pword c:\Autobatch\ClientJobSender.exe http://reportserver.net:8070/JobExecutor.asmx c:\AutoBatch\backup\trigger.xml

但获取未知用户或密码错误。

奇怪的是,我可以通过具有相同 IP 地址和用户/密码的远程桌面进行连接。

最佳答案

确保服务器具有以下设置:

a) Admin share is enabled: run services.msc and check the Service "Server" is enabled
b) Add the key for the share in the registry and restart:
reg add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /v AutoShareServer /t REG_DWORD /d 1

然后使用:
psexec \\IpAddress -u domain\user -p pword -w "c:\Autobatch" "ClientJobSender.exe http://reportserver.net:8070/JobExecutor.asmx c:\AutoBatch\backup\trigger.xml"

关于cmd - psexec 给系统找不到指定的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15906536/

相关文章:

c# - 在 C# 中获取 PsExec.exe 的进程 ID 需要帮助吗?

Windows cmd : How to find and kill . 运行并使用 wscript 隐藏的 bat 文件?

php - Composer 无法打开流 : Permission denied

.net-4.0 - C#确定远程桌面登录用户的计算机名

excel - 使用 VBA 在远程桌面上打开文件

java - 使用 Java 运行时 psexec 停止

windows - 在 Windows 命令提示符下运行上次执行的命令

batch-file - 在批处理脚本的for循环中重定向命令的输出

windows - Server 2003 中的单个远程桌面 session

batch-file - PSEXEC 错误 : No process is on the other end of the pipe