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-06 07:30
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to call a program in Startup? View 858 Replies 6
Original Poster Posted 2007-10-26 13:46 ·  中国 四川 成都 教育网
初级用户
Credits 138
Posts 47
Joined 2007-10-13 20:29
18-year member
UID 99658
Gender Male
Status Offline
Using the at command to call a program in “C:\Documents and Settings\Administrator\「Start」 Menu\Programs\Startup”, the system says it can't find the path. What's going on?
Floor 2 Posted 2007-10-26 16:37 ·  中国 浙江 杭州 电信
新手上路
Credits 10
Posts 4
Joined 2007-10-26 04:27
18-year member
UID 100806
Gender Male
Status Offline
Try changing it to C:\"Documents and Settings"\"Administrator"\
Floor 3 Posted 2007-10-26 17:04 ·  中国 四川 成都 教育网
初级用户
Credits 138
Posts 47
Joined 2007-10-13 20:29
18-year member
UID 99658
Gender Male
Status Offline
Still doesn't work
After changing it, dir can display the contents inside
but it still can't call the program in there
Floor 4 Posted 2007-10-26 17:13 ·  中国 四川 成都 教育网
初级用户
Credits 138
Posts 47
Joined 2007-10-13 20:29
18-year member
UID 99658
Gender Male
Status Offline
Still doesn't work
After changing it, dir can view the contents inside
but it still can't call the program in there
Floor 5 Posted 2007-10-27 11:23 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
First get the real path of the program in “C:\Documents and Settings\Administrator\「Start」 Menu\Programs\Startup”, then use at to call it.
Floor 6 Posted 2007-10-27 13:51 ·  中国 四川 成都 教育网
初级用户
Credits 138
Posts 47
Joined 2007-10-13 20:29
18-year member
UID 99658
Gender Male
Status Offline
I put a batch file in “Startup”
After the machine starts up I want it to call itself by itself,
but using at just won't work
Floor 7 Posted 2007-10-27 13:57 ·  中国 天津 电信
银牌会员
★★★
Credits 1,436
Posts 739
Joined 2007-10-11 17:44
18-year member
UID 99469
Gender Male
Status Offline
%0 can get the absolute path of the batch file itself

You can try "%~f0"
Forum Jump: