如何在批处理文件中使用启动命令? [英] How to use the start command in a batch file?
问题描述
我有一个很大的命令行参数启动应用程序的批处理文件:
I have a batch file that starts an app with a lot of command-line parameters:
"C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\11.0\WebDev.WebServer40.exe" /port:1672 /path:"C:\Code.Net\My App\Iteration 6\REL_6.8.806_PerfEnhanceV\Fusion\Code\CC.Fusion\CC.Fusion.Services" /vpath:"/FusionServices"
问题是,当我运行该批处理文件,直到命令完成,我想它走DOS窗口熬夜。所以,我尝试使用启动
命令,但把它放在面前,这样的:
The problem is that when I run the batch file, the DOS window stays up until the command completes and I'd like it to go away. So I tried using the start
command, but placing it in front, like this:
start "C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\11.0\WebDev.WebServer40.exe" /port:1672 /path:"C:\Code.Net\My App\Iteration 6\REL_6.8.806_PerfEnhanceV\Fusion\Code\CC.Fusion\CC.Fusion.Services" /vpath:"/FusionServices"
但我得到一个错误,指出无效开关 - /端口:1672
我也试着逃避双引号,但我并不没有成功。
I've also tried escaping the double quotes, but I wasn't not successful.
我该如何解决呢?
推荐答案
这是额外的一对兔耳朵应该做的伎俩。
An extra pair of rabbits' ears should do the trick.
start "" "C:\Program...
开始
关于第一个报价参数作为窗口标题,除非它是唯一的参数 - 任何开关,直到可执行文件的名称被视为开始
开关。
START
regards the first quoted parameter as the window-title, unless it's the only parameter - and any switches up until the executable name are regarded as START
switches.
这篇关于如何在批处理文件中使用启动命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!