【问题标题】:Windows 'start /b' command problemWindows 'start /b' 命令问题
【发布时间】:2011-10-12 10:43:10
【问题描述】:

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

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

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

【问题讨论】:

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

标签: windows command


【解决方案1】:
start /b "Window Title" "c:\Program Files\Wireshark\tshark.exe" -i 1 -w file1.pcap

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

更新

在@Ray Toal 的 cmets 之后,我尝试了一些组合:

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:\>

【讨论】:

  • 你确定吗?根据microsoft.com/resources/documentation/windows/xp/all/proddocs/… 的微软文档,窗口标题必须在/b 之前。
  • @ray thx,准备运行一些测试。周五遇到了同样的问题。
  • @Ray 好像start 不在乎它是在/b 之前还是之后,引号中的第一件事用作标题,之后的所有内容都是文件名和参数。
【解决方案2】:
start /b "" "c:\Program Files\Wireshark\tshark.exe" -i 1 -w file1.pcap

【讨论】:

    【解决方案3】:
    set PATH=%PATH%;c:\Program Files\Wireshark\
    start /B tshark -f -i 1 -w file1.pcap
    

    【讨论】:

    • 请为您的解决方案添加一些解释
    猜你喜欢
    • 2018-04-11
    • 1970-01-01
    • 2018-09-24
    • 2020-10-31
    • 1970-01-01
    • 2016-05-27
    • 2020-08-21
    • 2017-01-06
    • 1970-01-01
    相关资源
    最近更新 更多