【问题标题】:pass deluge torrentname to powershell via bat script通过 bat 脚本将 deluge torrentname 传递给 powershell
【发布时间】:2016-09-13 11:58:55
【问题描述】:

我已经安装了 deluge,并想使用执行插件通过 powershell 发送推送消息

set torrentname=%2
powershell.exe -ExecutionPolicy Unrestricted -File C:\Pushover-DelugeNotify.ps1 %torrentname%

我已经创建了上述内容,但由于某种原因它不起作用我看到一个 cmd 窗口闪烁并关闭,但没有消息通过。

我试过了

powershell.exe -ExecutionPolicy Unrestricted -File C:\Pushover-DelugeNotify.ps1 "Test"

没问题。

为什么我做错了?

【问题讨论】:

  • 在运行(第一个)批处理文件时,您是否还向它传递了 2 个参数(第二个是“测试”)?例如:"%YOUR_1ST_BATCH_FILE%" "ApparentlySomeUnusedArg" "Test".
  • 对不起,我的意思是当我使用带有“test”的命令时,我收到了 pushover 消息

标签: powershell batch-file torrent


【解决方案1】:

如果您的批次没有其他参数,则应使用“set torrentname=%1”

set torrentname=%1
powershell.exe -ExecutionPolicy Unrestricted -File C:\Pushover-DelugeNotify.ps1 %torrentname%

【讨论】:

  • 我试过了,但我看起来像 deluge 不会运行脚本我看到 cmd Windows 但什么也没发生
猜你喜欢
  • 2021-12-10
  • 2013-05-01
  • 1970-01-01
  • 2011-11-18
  • 1970-01-01
  • 2015-11-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多