中国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-07 02:51
48,040 topics / 350,125 posts / today 1 new / 48,252 members
DOS批处理 & 脚本技术(批处理室) » How to automatically save a BAT file
Printable Version  808 / 5
Floor1 jiecy Posted 2008-01-03 10:14
初级用户 Posts 9 Credits 27
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?
Floor2 huahua0919 Posted 2008-01-03 11:21
银牌会员 Posts 780 Credits 1,608
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?/
Floor3 jiecy Posted 2008-01-03 11:37
初级用户 Posts 9 Credits 27
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?
Floor4 HAT Posted 2008-01-03 16:28
版主 Posts 5,017 Credits 9,023
Floor5 jiecy Posted 2008-01-04 08:45
初级用户 Posts 9 Credits 27
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?
Floor6 lxmxn Posted 2008-01-04 10:25
版主 Posts 4,938 Credits 11,386
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023