Windows 'start /b' 命令问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6814075/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 08:36:43  来源:igfitidea点击:

Windows 'start /b' command problem

windowscommand

提问by sushant

I want to run the Tshark.exe in a background. Please can you tell me what is the problem in this command.

我想在后台运行 Tshark.exe。请你告诉我这个命令有什么问题。

start /b "c:\Program Files\Wireshark\tshark.exe" -i 1 -w file1.pcap

This cmd is giving me this error "Windows can not find '-i'......)

这个 cmd 给了我这个错误“Windows 找不到‘-i’......)

回答by Jacob

start /b "Window Title" "c:\Program Files\Wireshark\tshark.exe" -i 1 -w file1.pcap

startinterprets the first string enclosed in double quotes as the title of the window it should create.

start将用双引号括起来的第一个字符串解释为它应该创建的窗口的标题。

Update:

更新

After @Ray Toal's comments I tried some combinations:

在@Ray Toal 发表评论后,我尝试了一些组合:

L:\>start /b "L:\tools\scjview.exe" -i
The system cannot find the file -i.

L:\>start /b "test" "L:\tools\scjview.exe" -i
L:\>

回答by phil

start /b "" "c:\Program Files\Wireshark\tshark.exe" -i 1 -w file1.pcap

回答by Paulo Henrique Lellis Gonalves

set PATH=%PATH%;c:\Program Files\Wireshark\
start /B tshark -f -i 1 -w file1.pcap