Reputation: 695
This is the .bat file I am currently working on:
@echo off
net use \\servername\ /user:admin admin
call "C:\Documents and Settings\admin\Desktop\RBDPAY.bat"
exit
However when running the .bat file from local machine it give me this error:
The system cannot find the path specified.
Upvotes: 0
Views: 36
Reputation: 2761
SysInternals has a tool called psExec that does just that.
PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.
Your example would look like this:
psexec \\servername"C:\Documents and Settings\admin\Desktop\RBDPAY.bat"
Upvotes: 1