中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-02 01:26
48,037 topics / 350,122 posts / today 2 new / 48,250 members
DOS批处理 & 脚本技术(批处理室) » Can a BAT execute a file on a remote PC?
Printable Version  1,629 / 7
Floor1 acoreq Posted 2006-08-18 10:39
初级用户 Posts 32 Credits 98 From Shanghai
Run a BAT script on machine A, and then it needs to install a file on machine B.
If you just MAP to it the normal way, then the file will execute on machine A, and there’s no way to make it execute on machine B.
Question for the experts :)

Third-party tools would also be fine, hehe
Floor2 bagpipe Posted 2006-08-18 11:09
银牌会员 Posts 425 Credits 1,144 From 北京
If the system is 2000 or above, and you know the other side’s administrator username and password, then it can be done.
Floor3 test8 Posted 2006-08-18 13:28
初级用户 Posts 6 Credits 24
Actually you can use an ipc$ connection; for software just use the copy command plus the at command.
But it seems this works on 2000, not on XP, and 2003 also works.
Floor4 electronixtar Posted 2006-08-18 14:05
铂金会员 Posts 2,672 Credits 7,493
XP can do it too. But in all cases you copy it locally and run it. I once tried running it directly remotely, but the bat gave this prompt: UNC paths are not supported...
Floor5 acoreq Posted 2006-08-28 22:50
初级用户 Posts 32 Credits 98 From Shanghai
Does anyone have a specific example for me?
I can test it.

General talk doesn’t help me much, hehe

Also, I tried the AT mentioned by the poster above, but all the newly created JOBs failed and didn’t execute at all. I used the same ACCOUNT, and the permissions were all correct.
Haha
Floor6 Kinglion Posted 2006-08-28 23:59
铂金会员 Posts 1,924 Credits 5,798 From 金獅電腦軟體工作室
It’s still more convenient to use a VBS script.
Floor7 vkill Posted 2006-08-29 12:46
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
2000 xp, if you know the username and password

psexec executes cmd on the other machine, and then you can do whatever you want. At that point you can copy and execute on the other machine
Floor8 luyi Posted 2006-09-01 13:19
新手上路 Posts 8 Credits 7
Wouldn’t it be enough to just copy it onto that machine?
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023