Batch file 如何连接到服务器并运行命令从服务器中运行批处理文件?

Batch file 如何连接到服务器并运行命令从服务器中运行批处理文件?,batch-file,cmd,Batch File,Cmd,这是我目前正在处理的.bat文件: @echo off net use \\servername\ /user:admin admin call "C:\Documents and Settings\admin\Desktop\RBDPAY.bat" exit 但是,从本地计算机运行.bat文件时,会出现以下错误: The system cannot find the path specified. SysInternals有一个名为的工具,它就是这样做的 PsExec是一种轻量级tel

这是我目前正在处理的.bat文件:

@echo off

net use \\servername\ /user:admin admin
call "C:\Documents and Settings\admin\Desktop\RBDPAY.bat"

exit
但是,从本地计算机运行.bat文件时,会出现以下错误:

The system cannot find the path specified.

SysInternals有一个名为的工具,它就是这样做的

PsExec是一种轻量级telnet替代品,它允许您执行 其他系统上的进程,具有针对 控制台应用程序,无需手动安装客户端 软件。PsExec最强大的用途包括启动interactive 远程系统和远程启用工具上的命令提示,如 IpConfig,否则无法显示信息 关于远程系统

您的示例如下所示:

psexec \\servername"C:\Documents and Settings\admin\Desktop\RBDPAY.bat"