![]() |
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-10-31 02:32 |
47,815 topics / 349,930 posts / today 0 new / 48,290 members |
| DOS疑难解答 & 问题讨论 (解答室) » Why can't %username% be displayed in the at command |
| Printable Version 1,585 / 1 |
| Floor1 namejm | Posted 2006-04-22 23:12 |
| 荣誉版主 Posts 1,737 Credits 5,226 From 成都 | |
|
Under XP I made an at task to call test.bat and run it in the background. One line in test.bat is echo %username%>>D:\list.txt. After test.bat runs at the scheduled time, the current logged-in username does not appear in list.txt, and instead it shows
"ECHO is off." If I run test.bat by itself, it displays correctly. What is going on? [ Last edited by namejm on 2006-4-22 at 23:41 ] |
|
| Floor2 chenall | Posted 2006-04-23 09:10 |
| 银牌会员 Posts 469 Credits 1,276 From 福建泉州 | |
|
The at command uses the SYSTEM account,
which does not have the %username% variable. You can use at xx:xx /interactive cmd to start cmd, then use set to check. |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |