mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Command prompt no longer executing in Run External Program #4432
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#4432
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Viridel on GitHub (Jun 25, 2016).
Whether it (cmd.exe) is part of the script line, or if removing that part and just having the BAT as the script line, it's no longer executing. It is possible to have it run via a BAT->EXE converter tool (then setting script.exe as the command line), but since CMD doesn't actually launch, it's impossible to do any code troubleshoting. In addition with this method (at least on my system) one copy of script.exe gets held in the Task Manager each time it executes.
@Chocobo1 commented on GitHub (Jun 26, 2016):
You might be affected by #5399.
and what is your qbittorrent version?
@Viridel commented on GitHub (Jun 26, 2016):
I:\qBittorrent\script.bat "%F"
Definitely doesn't exceed 260 characters :)
@gddeluca commented on GitHub (Jun 26, 2016):
Having same problem. I believe (not positive) that while this was working in a previous release, the latest qbittorrent release has killed it. e.g. my command is
"e:\OneDrive\Misc Data\UnZipit.bat" "E:\P2P%N"
I altered the BAT file to put a PAUSE at the end so I could perhaps see what's going on, but it appears the BAT file is never started.
[Update] Tried adding CMD.EXE /C in front of the command - no effect. The qBittorrent log indicates it is trying to run the command, but there is no external evidence of it happening.
@Chocobo1 commented on GitHub (Jun 26, 2016):
I confirm this is a bug.
@gddeluca
workaround for now, try:
hh & "e:\OneDrive\Misc Data\UnZipit.bat" "E:\P2P\%N"@Viridel
Try:
hh & I:\qBittorrent\script.bat "%F"@Viridel commented on GitHub (Jun 26, 2016):
I've reverted to 3.3.4, and will wait until 3.3.6 to re-evaluate.
@gddeluca commented on GitHub (Jun 26, 2016):
Do you mean me to substitute something for hh? or to just code it as shown. I tried it as shown and saw nothing different. What is hh meant to be?
[Update] Meanwhile, like Viridel, I've backed down to 3.3.4 to keep things working.
@Chocobo1 commented on GitHub (Jun 26, 2016):
@gddeluca
Just as shown.
it's invoking
Windows HTML Help, I'm trying to use it as a dummy command, but seems it doesn't workaround the problem. (works for me though...)@gddeluca commented on GitHub (Jun 26, 2016):
OK, thanks for explaining hh. I've no problems remaining on 3.3.4 until this is corrected.
@Chocobo1 commented on GitHub (Jun 26, 2016):
@sledgehammer999
below is my findings:
won't work:
will work:
Since I can't find a way to solve this, I'm thinking of deleting the windows-specific code section, revert back to
QProcess::startDetached(program);@gddeluca commented on GitHub (Jun 26, 2016):
Hmmm, I guiess what worked in 3.3.4 had some other problem, otherwise, why modify code that is working? As a developer myself, I well know the 'don't fix what ain't broken' mantra.
@sledgehammer999 commented on GitHub (Jul 12, 2016):
@Chocobo1 I today tried to fix this. But I can see why you gave up. I think we need to revert back to the pre-v3.3.5 way of calling programs. The problem described here is actually a Windows/cmd.exe bug involving batch files.
See these 2 relevant SO posts:
I get the same error as the one they report for the "start" command. I believe "cmd.exe /c" uses the same command internally.
@tekko commented on GitHub (Jul 13, 2016):
http://ss64.com/nt/cmd.html
Looking at the examples at the bottom, you need to quote the whole line that u want to start with cmd /c
Maybe try to prepend (cmd /c ") and insert " at the end ?
@Chocobo1 commented on GitHub (Jul 15, 2016):
I guess the info in the link is right. Thanks!
@sledgehammer999
I've updated #5408. It contains a fix for https://github.com/qbittorrent/qBittorrent/issues/5439#issuecomment-228616817 and now all my test cases work correctly.
Well... your choice to close (and revert the code) or accept that PR.
@sledgehammer999 commented on GitHub (Jul 17, 2016):
Fix accepted. Going to release v3.3.6 later today.
@Chocobo1 commented on GitHub (Jul 17, 2016):
Nice 👍 and don't forget #5409 & #5474.
@DrKittens commented on GitHub (Jul 21, 2016):
We forgot to document the syntax, can an example please be added instead of the "Tip" at the bottom of the "options > Downloads" tab or at the very least say to encapsulate everything seperately because they're ALL arguments now (qbt runs cmd /c |what we enter in the field goes here|)
It makes sense once you see an example that works but it took me a while to actually find a working example haha
Relevant Support thread post: https://qbforums.shiki.hu/index.php?topic=4223.msg23001#msg23001
@ArionMiles commented on GitHub (Sep 6, 2016):
Even on the v3.3.6, the issue persists.
@war59312 commented on GitHub (Jan 21, 2017):
Here is my Kodi Notification script which works around this bug.
Options > Downloads > "Run external programon torrent completion" is set to:
@spidawg commented on GitHub (Mar 6, 2017):
This is still an issue in 3.3.11
@infideler commented on GitHub (May 27, 2017):
Also having this issue on 3.3.12, unfortunately.
@Chocobo1 commented on GitHub (May 27, 2017):
@infideler
Can you try out the build in https://github.com/qbittorrent/qBittorrent/issues/5497#issuecomment-284640536 and let me know if it works?
@war59312 commented on GitHub (May 28, 2017):
@Chocobo1 Pretty sure all you really needed to do was change in Line 264
cmd.exe /Ctocmd.exe /K.@Chocobo1 commented on GitHub (May 29, 2017):
I don't think so, the external program is supposed to run and exit, using
/Kwill cause it keep running, right?@war59312 commented on GitHub (May 31, 2017):
Whoops, you are correct... Guess I was thinking something else for some odd reason.
Sorry about that.
@infideler commented on GitHub (Jun 4, 2017):
@Chocobo1
Sorry for the delay. Can confirm that build 3.4.0alpha does work as expected.
@j-marcon commented on GitHub (Nov 14, 2017):
Hi,
Long story short, I've jumped from a version <3.3.4 to 3.3.16, realised that the the external program feature didn't work anymore and decided to go to 3.4.0beta since the code was reverted according to this thread. However, it seems like running an external program on 3.4.0beta is still broken. Anyone else has observed this? I run something similar to what @infideler used:
I've tried with and without quotation marks, with left and right slashes and nothing seems to work. The cmd prompt never opens. Any idea?
@Chocobo1 commented on GitHub (Nov 14, 2017):
Yes, try this 3.4.0beta2 x64 build and see if it works: https://github.com/Chocobo1/temp/raw/master/3/qbittorrent.exe
The relevant code wasn't reverted yet.
@j-marcon commented on GitHub (Nov 14, 2017):
Thanks, @Chocobo1. It works perfectly fine now. Will this be the case in the release version of 3.4.0 too?
@j-marcon commented on GitHub (Nov 20, 2017):
Hi again, I've been prompted by the GUI to update to 4.0.0. Has anyone tested that the feature works in 4.0.0 release?