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-07 03:46
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to automatically save a BAT file View 810 Replies 5
Original Poster Posted 2008-01-03 10:14 ·  中国 河南 焦作 联通
初级用户
Credits 27
Posts 9
Joined 2007-05-29 17:30
19-year member
UID 89675
Gender Female
Status Offline
For example, a MAC-bound batch file needs to be run once every time before entering; copy it to the c:\documents and settings\all users directory? How can I use a script file to save it to the directory mentioned in the title, so that when I send it out, everyone can just double-click it and it will copy itself in?
Floor 2 Posted 2008-01-03 11:21 ·  中国 江苏 苏州 移动
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
Not expressed clearly.
How do you bind a batch file to a MAC?
Each time you run it once, copy what to the ... directory??
When you send it out... send out what?/
Floor 3 Posted 2008-01-03 11:37 ·  中国 河南 焦作 联通
初级用户
Credits 27
Posts 9
Joined 2007-05-29 17:30
19-year member
UID 89675
Gender Female
Status Offline
The contents of the batch file:
arp -s 10.0.0.1 12-13-14-15-16-11
arp -s 10.0.0.2 13-14-15-16-11-12

I hope to use VBS to make a small program that, after running, can generate the above batch file contents and automatically save them as c:\documents and settings\all users\ipmac.bat

Clear enough now?
Floor 4 Posted 2008-01-03 16:28 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Floor 5 Posted 2008-01-04 08:45 ·  中国 河南 焦作 联通
初级用户
Credits 27
Posts 9
Joined 2007-05-29 17:30
19-year member
UID 89675
Gender Female
Status Offline
Thanks, I thought scripts couldn't create files.
But under win2003, the allusersprofile directory is CurrentUserName.windows, not the all users directory. How can this be solved?
Floor 6 Posted 2008-01-04 10:25 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Forum Jump: