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-01 22:11
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] A batch file question for DOS experts View 998 Replies 6
Original Poster Posted 2006-08-02 17:24 ·  中国 广东 深圳 电信
初级用户
Credits 22
Posts 7
Joined 2006-08-02 17:11
19-year member
UID 59697
Gender Male
Status Offline
I want the client machine to automatically download stuff from the server, download it as soon as it boots, and run it.
How should this command be written???

When XP downloads and runs a shared file, there will be a confirmation window... how can I automatically confirm it in a batch file???



When the client boots up... check the network... once connected, download a file from HTTP, FTP, or a shared path... and run it??
How do I write this batch file????

I'm really a newbie... I just can't figure it out...



Also... how do you write a batch file test to determine whether the network is connected???
Floor 2 Posted 2006-08-02 17:40 ·  中国 广东 深圳 电信
初级用户
Credits 22
Posts 7
Joined 2006-08-02 17:11
19-year member
UID 59697
Gender Male
Status Offline
Ugh...
No way??
Is the DOS forum this quiet now??

[ Last edited by kina2008 on 2006-8-2 at 17:45 ]
Floor 3 Posted 2006-08-02 18:37 ·  中国 黑龙江 哈尔滨 联通
初级用户
Credits 48
Posts 20
Joined 2005-08-19 17:57
20-year member
UID 41795
Status Offline
Floor 4 Posted 2006-08-02 18:43 ·  中国 广东 深圳 电信
初级用户
Credits 22
Posts 7
Joined 2006-08-02 17:11
19-year member
UID 59697
Gender Male
Status Offline
Mm-hmm... THANK... thanks....
STANT means running a file, right??

:run
start /min /b \\BAK\桌面$\arp.bat
start \\bak\桌面$\桌面.exe
start /min /b \\bak\桌面$\ie.bat

Can you explain these lines?
Floor 5 Posted 2006-08-02 18:44 ·  中国 广东 深圳 电信
初级用户
Credits 22
Posts 7
Joined 2006-08-02 17:11
19-year member
UID 59697
Gender Male
Status Offline
But after executing the STANT statement...
it seems EXIT can't be used. . Should QUIT be used instead??
Floor 6 Posted 2006-08-03 04:34 ·  中国 黑龙江 哈尔滨 联通
初级用户
Credits 48
Posts 20
Joined 2005-08-19 17:57
20-year member
UID 41795
Status Offline
start /min /b \\BAK\桌面$\arp.bat
start \\bak\桌面$\桌面.exe
start /min /b \\bak\桌面$\ie.bat

arp.bat 桌面.exe ie.exe are all batch files I wrote because I needed them, you can remove them too.

Explanation of start parameters
min minimize the window when executing
b Starts an application without creating a new window. Unless
^C handling is enabled, the application will ignore ^C handling;
^Break is the only way to interrupt the application
Also, when using start to run a program, it has to wait until the program being run ends before continuing to execute the next line. "exit" is just an exit statement; suppose you use "exit" in ie.bat, the effect is the same
This batch file works on xp home and pro
Floor 7 Posted 2006-08-03 23:47 ·  中国 广东 深圳 电信
初级用户
Credits 22
Posts 7
Joined 2006-08-02 17:11
19-year member
UID 59697
Gender Male
Status Offline
And also this:
When XP downloads and runs a shared file, there will be a confirmation window... how can I automatically confirm it in a batch file???
Forum Jump: