![]() |
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-15 17:58 |
47,813 topics / 349,903 posts / today 1 new / 48,257 members |
| DOS疑难解答 & 问题讨论 (解答室) » [Help] How can a usage period be implemented for a batch file under pure DOS? |
| Printable Version 999 / 2 |
| Floor1 nmycj | Posted 2009-08-16 10:25 |
| 新手上路 Posts 5 Credits 11 | |
|
How can a usage period be implemented for a batch file under pure DOS?
After the first run, create a file to record the year, month, and day. Then set the usage period to 1 year. Each time it runs, first read the file that records the date. For example, if it is run on 2009.8.16, then the batch file's expiration time would be before 2010.8.16; if it is run on 2010.8.16 or any day after that, it deletes itself. |
|
| Floor2 anoki | Posted 2009-08-16 15:00 |
| 新手上路 Posts 8 Credits 13 | |
|
Does it need to be executed at boot?
|
|
| Floor3 nmycj | Posted 2009-08-16 20:46 |
| 新手上路 Posts 5 Credits 11 | |
|
Yes, at boot, run autoexec.bat under DOS.
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |