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-01 15:55
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Newbie Help: About running a batch file at startup View 1,423 Replies 1
Original Poster Posted 2006-05-11 23:42 ·  中国 江苏 淮安 电信
新手上路
Credits 6
Posts 1
Joined 2006-05-11 23:38
20-year member
UID 55352
Status Offline
I wrote a batch file because I needed it.
I added it to the Windows Startup group, but every time the system starts and the batch file launches automatically, a black cmd box pops up.
Question for all the experts: how can I make the batch file start automatically at boot in the background or run hidden, so the command-line black box disappears?
Urgent~~~
Floor 2 Posted 2006-05-11 23:59 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
1, Call it with vbs; you can refer to this thread
2, Run the bat before the system loads explorer; you can modify the registry:

Windows Registry Editor Version 5.00


"Script"="C:\\startup.bat"
"Parameters"=""


After modifying the above registry, not only can it not be seen in msconfig, it also cannot be seen with wmic startup. Only by using
Gpresult /v | findstr "名称" |findstr /v "站点" | findstr /v "域"

can it be viewed from the command line.
Method 2 was tested under SP1; I haven't tested it in a long time.
Of course, you can also try putting the startup file in the All Users Startup folder and see. I guess it should be before loading personal settings. (untested)
Forum Jump: