1

我有一个简单的批处理文件:

ECHO OFF
CLS
ECHO WELCOME
ECHO.
ECHO Launching your app...

我想要返回到用户可以键入命令的默认 CMD 状态,我的意思是,这种状态:C:[path][path].....>
我想给用户继续的可能性在 echo "Launching your app..." 之后输入他想要的任何内容,所以在视觉上它会给出这个:

欢迎
启动您的应用程序...
C:[path][path][path]> _

4

1 回答 1

1
@echo off
    rem check if started from own process (use our own parameter)
    rem and if not, spawn a new cmd with correct parameters and 
    rem keep it open

    if not "%~1"=="__startcmd__" (
        "%comspec%" /k "%~f0" __startcmd__ %* 
        exit
    )

    rem eliminate custom parameter of parameter list
    shift

    rem your custom screen
    cls
    title "command window"
    prompt $p$g
    echo WELCOME
    echo Launching your app ...
于 2013-11-12T11:14:31.173 回答