【问题标题】:Thunderbird compose email in a batch script - continue to next commandThunderbird 在批处理脚本中撰写电子邮件 - 继续执行下一个命令
【发布时间】:2011-06-06 14:41:07
【问题描述】:

在批处理脚本中使用以下行来调用 Thunderbird 并撰写电子邮件:

thunderbird.exe -compose "to='email@domain.com',subject='Some Subject',preselectid='id1',body='Message Body',attachment='File.txt'"

该命令执行得非常好,但是批处理脚本在应用程序终止之前不会继续。有没有办法绕过这个,以便脚本继续执行下一个命令?

【问题讨论】:

标签: batch-file thunderbird


【解决方案1】:

在命令前使用start /b,启动进程后批处理脚本会继续执行。

【讨论】:

  • 注解:直接运行程序(例如 CMD C:\Some\Program.exe)或使用带有 /WAIT 开关的 START 命令有区别吗?
  • /b 开关不隐藏应用程序吗? “在不创建新窗口的情况下启动应用程序”(通过 cmd START /?)
  • 好问题,不知道有什么区别。 start 打开一个不是你想要的控制台窗口,因此 /b 标志
  • START /B 很适合这个。但是,请注意,如果您引用的是绝对路径(例如 C:\Program Files\Mozilla Thunderbird\thunderbird.exe -compose "to='email@domain.com',subject='Some Subject',preselectid='id1 ',body='Message Body',attachment='File.txt'") 它会失败,因为带有空格的路径需要引号,但 Thunderbird 命令行参数也需要引号,因此您会收到错误消息。谢谢查尔斯
  • @Mechaflash 为避免这种情况,您可以在调用 start 之前 CD 到 C:\Program Files\Mozilla Thunderbird,现在没有绝对路径(也没有引号),因为 thunderbird.exe 在此目录中
猜你喜欢
  • 2018-01-17
  • 2016-03-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-02-26
相关资源
最近更新 更多