China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 02:26
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Can a BAT execute a file on a remote PC? View 1,630 Replies 7
Original Poster Posted 2006-08-18 10:39
初级用户
傻傻分不清楚...
Credits 98
Posts 32
Joined 2006-07-01 14:29
20-year member
UID 57838
From Shanghai
Status Offline
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
Floor 2 Posted 2006-08-18 11:09 ·  中国 北京 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
If the system is 2000 or above, and you know the other side’s administrator username and password, then it can be done.
Floor 3 Posted 2006-08-18 13:28 ·  中国 广东 梅州 电信
初级用户
Credits 24
Posts 6
Joined 2006-07-20 21:55
20-year member
UID 58941
Status Offline
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.
Floor 4 Posted 2006-08-18 14:05 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
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...

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 5 Posted 2006-08-28 22:50
初级用户
傻傻分不清楚...
Credits 98
Posts 32
Joined 2006-07-01 14:29
20-year member
UID 57838
From Shanghai
Status Offline
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
Floor 6 Posted 2006-08-28 23:59 ·  中国 辽宁 朝阳 联通
铂金会员
★★★★
痴迷DOS者
Credits 5,798
Posts 1,924
Joined 2003-06-20 00:00
23-year member
UID 5583
Gender Male
From 金獅電腦軟體工作室
Status Offline
It’s still more convenient to use a VBS script.
熟能生巧,巧能生精,一艺不精,终生无成,精亦求精,始有所成,臻于完美,永无止境!
金狮電腦軟體工作室愿竭诚为您服务!
QQ群:8393170(定期清理不发言者)
个人网站:http://www.520269.cn
电子邮件:doujiehui@vip.qq.com
微信公众号: doujiehui
Floor 7 Posted 2006-08-29 12:46 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
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
Floor 8 Posted 2006-09-01 13:19 ·  中国 上海 上海乾万网络(QianWan_Network)有限公司(电信出口)
新手上路
Credits 7
Posts 8
Joined 2006-08-31 22:15
19-year member
UID 61652
Status Offline
Wouldn’t it be enough to just copy it onto that machine?
Forum Jump: