Page 1 of 1

Windows qbittorrent Any way to disable CLI window popup

Posted: 01 Feb 2016, 18:05
by Pedge
So I've got qbittorrent to run filebot on torrent completion, and it's BRILLIANT, everything works as it should with one exception:

My execute on completion line is currently:

Code: Select all

filebot -script fn:amc --output "f:/torrents" --action duplicate --conflict skip -non-strict --log-file f:/amc.log --def excludeList=f:/amc.excludes unsorted=y music=n artwork=n "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L" --def "seriesFormat=F:/TV/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}" "animeFormat=F:/Anime/Season {s.pad(2)}/{n} - {s00e00} - {t}" "movieFormat=F:/Movies/{n}/{n}" "musicFormat=N:/Music/{n}/{n}" --def deleteAfterExtract=y
and obviously it pops up a CLI window when it runs. I've tried changing the command to start with

Code: Select all

C:\Program Files\FileBot\filebot.launcher
I've tried

Code: Select all

C:\Program Files\FileBot\filebot.launcher.exe
(the paths are accurate, I've checked and double checked, and I've used / slashes and \ slashes. Neither of the above do anything)

I've tried using

Code: Select all

cmd /c filebot
(this one just runs exactly the same as normal, with the cli window popup)

None of the above worked.

Any tips? I'm guessing it's something VERY obvious but I've got no clue

Re: Windows qbittorrent Any way to disable CLI window popup

Posted: 01 Feb 2016, 18:31
by rednoah
Read the Quote Arguments section:
viewtopic.php?f=4&t=1899

Re: Windows qbittorrent Any way to disable CLI window popup

Posted: 01 Feb 2016, 18:45
by Pedge
Superb :) Many thanks

Re: Windows qbittorrent Any way to disable CLI window popup

Posted: 14 May 2016, 20:03
by BuzzLightyear
I'm trying my best to read everything included here and determine how exactly this was answered/solved.

I have tried using absolute paths with quotes:

Code: Select all

"C:\Program Files\FileBot\filebot.launcher.exe" -script fn:amc --output "P:\Files\Unsorted" --action move -non-strict "P:\Files\Unsorted" --log-file amc.log --def excludeList=amc.txt --def clean=n "seriesFormat={n}/{'Season '+s}/{n} - {s00e00} - {t}"
I have tried using just filebot.launcher in the beginning.

Code: Select all

filebot.launcher -script fn:amc --output "P:\Files\Unsorted" --action move -non-strict "P:\Files\Unsorted" --log-file amc.log --def excludeList=amc.txt --def clean=n "seriesFormat={n}/{'Season '+s}/{n} - {s00e00} - {t}"
And nothing will run. Opening a cmd prompt and using filebot.launcher opens the exe. Adding the

Code: Select all

cmd /c
to the beginning before filebot doesn't change anything with the prompt showing, but it does run the usual script.

I am obviously missing something that would link making filebot.launcher.exe the the exe that runs in the script, and what makes it actually open and/or the prompt not interrupt my current pprogram or game at the time.

Re: Windows qbittorrent Any way to disable CLI window popup

Posted: 15 May 2016, 02:46
by rednoah
How do you know it doesn't work? GUI executables don't have prompts, so you will never see any output if you use the *.launcher.exe executables. Use "filebot.exe" instead.

Re: Windows qbittorrent Any way to disable CLI window popup

Posted: 23 May 2016, 16:41
by BuzzLightyear
My intent is to make it run just the same as though i only put in filebot for the executable.

watching task manager, filebot starts up and runs when filebot is the first piece, but when i use filebot.launcher or filebot.launcher.exe or even a direct path to the launcher exe with quotations around the path, as Program Files has a space... It refuses absolutely to ever run filebot.launcher as something that would extract in the background.

The only was I can convince the qbittorrent's cli (or even a CMD window) to do anything with filebot.launcher, is to not add anything after the exe. This makes it simply open the user interface for filebot which makes sense.


what do i need to do to make either using filebot stay in the background and not interrupt my current program, or make filebot.lauuncher run the script that's in place and successfully be called?

Re: Windows qbittorrent Any way to disable CLI window popup

Posted: 23 May 2016, 17:26
by rednoah
Note that if you call an executable with it's absolute path in CMD it can't possibly not work. Did you manage to make it work correctly from CMD? As you won't get any console output, you might want to check the logs and see if it's doing something, or if there's any errors.

Narrow down the issue. Maybe it's your fault. Maybe it's qBTs fault.

Re: Windows qbittorrent Any way to disable CLI window popup

Posted: 07 Jun 2016, 00:20
by tylargh
To anyone who is struggling with this: what you're trying to overcome is native Windows behavior.

Unfortunately, if you're in fullscreen mode for a video game and a new window pops up, the window manager will throw you out of fullscreen and give context to the popped up window. For batch scripts that can run whenever, this is obviously not a good thing, as a new cmd window will be opened to run the program. Note: It doesn't matter if you're running FileBot via the CLI interface or the launcher, it will still knock you out of fullscreen mode for your game.

HOW TO FIX

You need to be able to launch the batch script as a true "background process" (pardon the linux-y terminology), meaning that you need to execute the program/batch file, but you need to to happen in the background and the window manager shouldn't care about it.

Create Hidden Process is FOSS that will do just that: http://www.commandline.co.uk/chp/

There are many others that do this, but this is the simplest, most transparent one that I could find that is still available.

USAGE

Unzip CHP, and run filebot as:

Code: Select all

"C:\Path\To\chp\chp.exe" filebot <filebot args>
This will run filebot via the CLI, but not open CMD window through the window manager. While in a fullscreen game, you will not be kicked out of context.

Hope this helps :)