1.

Solve : running batch files on other computers?

Answer»

All,

I have created a batch FILE which runs a file on my computer. The batch is as follows

cd \PROG*\nov*
radntfyc.exe localhost radskman mname=ACCORD,dname=SOFTWARE,startdir=$MACHINE,uid=$MACHINE,handle_reboot=y,ask=n,ulogon=n,ind=y,cat=prompt,context=m



I am trying to work out how to change this so it will run on another PC. All the pc's have a unique computer name and the share name is c$.

Can i just change the batch file to change the startdir or uid to the computer i wantWell, you would have to explain a LOT more for me to understand your problem.

But to answer what I think is your basic question,

%computername%
That variable, used in your BAT file, will supply the computer name of whoever runs it.

Mac
I would like to put in my btach file the computer name of another pc. So when i run the file it will run on there pc instead of mine. therefore doing this remotleyDifferent possibilities:
psexec (3rdparty from sysinternals pstools) to execute the batch on the remote pc.
at or soon to execute it. (set a scheduled job).
sftp. (this has to be installed on the remote PCS first.)
rcmd from the [RK] I don't have experience with it. It is described in Tim Hill NT Shellscripting book.

Some Commands have remote functionality itself.
So it depends what your batchfile shall do.

Just read out a list of pcnames with a for loop and it goes...

hope it helps
uliOK. So what you really want is a way to start a program running on another person's computer.

Good luck with that!! I have only seen that done with expensive tools installed on all computers and left running all day.

There is no way you can run something on another computer EXCEPT that computer already has something running that is polling the network and waiting for a signal to run.

Sorry.

MacWhere is the problem  to do this with "at" as a scheduled  task? (It is free and on the system.)
You can set the task for remote pcs from yours.

uli Quote

Where is the problem  to do this with "at" as a scheduled task?

Hi, uli,

I hope the OP wasn't discouraged by my post. You are right. AT is already available.

HELP AT run from the DOS prompt gives specs.

Good catch. I used it for years as a DBA responsible for 15 servers. I could run stuff from my office if all the times were more-or-less synchronized. If they weren't, it was possible to schedule a task for a time that had elapsed. I used http://www.thinkman.com/dimension4/ to ensure times were consistent.

Mac


Discussion

No Comment Found