Command to run a batch files I want to run on a remote computer

B

boe

If I'm on computer Jack but I want to inititate a batch file I want to run
on computer Jill, how do I get the batch file? I'm not talking about a
remote desktop or anything, I want to use a command line to make a batch
file run on a remote computer.

Thanks
 
G

Guest

Try VNC - there's a ton of freeware variants out there that will do this.
Beware of the networking limitations of XPHome - some of the commands won't
run across a network.
 
D

David Candy

Use WSH Remote Scripting object.


Windows Script Host

WshRemote Object
See Also
WshController Object

Language
a.. JScript

b.. VBScript

c.. Show All



Provides access to the remote script process.

Remarks
The WshRemote object allows you to remotely administer computer systems on a computer network. It represents an instance of a WSH script, i.e., a script file with one of the following extensions: .wsh, .wsf, .js, ..vbs, .jse, .vbe, and so on. An instance of a running script is a process. You can run the process either on the local machine or on a remote machine. If you do not provide a network path, it will run locally. When a WSHRemote object is created (by using the CreateScript() method), the script is copied to the target computer system. Once there, the script does not begin executing immediately; it begins executing only when the WSHRemote method Execute is invoked. Through the WshRemote object interface, your script can manipulate other programs or scripts. Additionally, external applications can also manipulate remote scripts. The WshRemote object works asynchronously over DCOM.

Example
The following example demonstrates how the WshRemote object is used to start a remote script.

[VBScript]
Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("test.js", "remoteserver")
RemoteScript.Execute

Do While RemoteScript.Status <> 2
WScript.Sleep 100
Loop[JScript]
var Controller = WScript.CreateObject("WSHController");
var RemoteScript = Controller.CreateScript("test.js", "remoteserver");
RemoteScript.Execute();

while (RemoteScript.Status != 2) {
WScript.Sleep(100);
}Properties
Status Property | Error Property

Methods
Execute Method | Terminate Method

Events
Start Event | End Event | Error Event

See Also
WshController Object
 
T

Torgeir Bakken \(MVP\)

boe said:
If I'm on computer Jack but I want to inititate a batch file I
want to run on computer Jill, how do I get the batch file? I'm
not talking about a remote desktop or anything, I want to use a
command line to make a batch file run on a remote computer.
Hi,

Two tools listed below that can run exe and batch files on remote
computers.

Take a look at PsExec.exe in the free PsTools suite, found at
http://www.sysinternals.com

Another freeware program with similar merits to PsExec is Beyondexec.
http://www.beyondlogic.org/consulting/remoteprocess/BeyondExec.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top