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-09 16:41
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] After the BAT calls the EXE, it cannot automatically exit by itself. View 3,168 Replies 15
Original Poster Posted 2008-08-27 11:12 ·  中国 江苏 扬州 江都区 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Ask: After a BAT calls an EXE, how does it automatically exit by itself.
Floor 2 Posted 2008-08-27 11:22 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
start "" yourprogram.exe
Floor 3 Posted 2008-08-27 11:27 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by huahua0919 at 2008-8-27 11:22 AM:
start "" yourprogram.exe



I have plenty of CALLs.

Using START cannot open the program file,,

My problem is that after opening the program file, the BAT gets stuck there and doesn't automatically exit.

I want it to automatically exit (close) the BAT after launching the program
Floor 4 Posted 2008-08-27 11:35 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
You have plenty of calls. Why does it say that start cannot run the program file? Let's see if this program can be executed. start "" freecell. Does the p automatically exit?
Floor 5 Posted 2008-08-27 11:39 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by huahua0919 at 2008-8-27 11:35 AM:
You have plenty of calls.
Why do you say that start can't run program files?
Let's see if this program can execute \
start "" freecell
Does the p automatically exit?




Dizzy, dude.


What is start "" freecell?
It brings up the freecell in XP...
The BAT automatically exits
Please give an explanation.

[ Last edited by cad55 on 2008-8-27 at 11:42 AM ]
Floor 6 Posted 2008-08-27 11:42 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
I'm also confused. If there are long filenames and files with spaces in your program, it's best to call them using short names!
Floor 7 Posted 2008-08-27 11:43 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
start "" freecell is what exactly, it brought up the FreeCell of XP......BAT is to exit automatically
Floor 8 Posted 2008-08-27 11:44 ·  中国 江苏 苏州 中移铁通
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
I only tell you the method, in fact, the meaning is all the same
Floor 9 Posted 2008-08-27 11:47 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
After CALL, the batch processing cannot continue to run, and only START can be used. Which program can't you open with START? How did you write your code?
Floor 10 Posted 2008-08-27 11:59 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by HAT at 2008-8-27 11:47 AM:
After CALL, the batch processing cannot continue to run, and only START can be used.
Which program can't you open with START? How is your code written?



ren "C:\Documents and Settings\Administrator\My Documents\Adlm\a.dll" "%~n1a.rar"
ren "C:\Program Files\a\Sample\Manager.exe" "%~n1Manager.rar"
ren "C:\Program Files\a\Groups\Groups.dll" "%~n1Groups.rar"
ren "C:\Program Files\a\User\a.dll" "%~n1a.rar"
start regedit /s "%cd%\-.reg"
call "C:\Program Files\a\wnwb.exe"


After opening wnwb.exe (Universal Wubi), the BAT gets stuck there and doesn't exit automatically...


Note: Using
start "C:\Program Files\a\wnwb.exe"
cannot bring it up

[ Last edited by cad55 on 2008-8-27 at 12:00 PM ]
Floor 11 Posted 2008-08-27 12:04 ·  中国 陕西 西安 电信
铂金会员
★★★★
Credits 5,212
Posts 2,478
Joined 2007-02-08 23:39
19-year member
UID 79003
Gender Male
Status Offline
start "Universal 5B" "C:\Program Files\a\wnwb.exe"
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore
Floor 12 Posted 2008-08-27 12:10 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by slore at 2008-8-27 12:04 PM:
start "万能5B" "C:\Program Files\a\wnwb.exe"



Great minds... it works now

Thanks...

Asking, is this the formula for START?

START "short name" + "program path"
Floor 13 Posted 2008-08-27 12:13 ·  美国 惠普HP
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
START "标题" "程序路径"
Read more help
start /?
Floor 14 Posted 2008-08-27 12:16 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Originally posted by HAT at 2008-8-27 12:13 PM:
START "Title" "Program path"
Read the help more
start /?



Thank you, I never read the help when learning BAT (I get a little confused when I read it), I just remember the formulas written by others,
I just started using START. That's why there is such a thing,......

Thank you again......
Floor 15 Posted 2008-08-27 14:43 ·  中国 广东 广州 电信
中级用户
★★
Credits 233
Posts 117
Joined 2007-11-28 02:38
18-year member
UID 104005
Gender Male
Status Offline
Note: Using
start "C:\Program Files\a\wnwb.exe"
cannot bring up



Reply to the 10th-floor brother

When starting a file with spaces or a path with spaces, write it like this

start "" "C:\Program Files\a\wnwb.exe"

Add an extra pair of double quotes after start
Forum Jump: