Jump to content

Add /quit command line parameter


Recommended Posts

It would be useful to me, and possibly to others, if there was a way to quit uTorrent cleanly from the command line, say for example with a /quit command line parameter.


I use a VPN and want to run uTorrent only when the VPN is up; a scheduled task on my machine runs this code:

@echo off
rem Waits for VPN to come up then starts uTorrent; kills uTorrent (within a minute or so) if VPN goes down, then starts over

nslookup privateinternetaccess.com 2>&1 | find "Server:" | find "privateinternetaccess.com" >nul
if not errorlevel 1 goto VPNisUp
ping -n 61 >nul
goto Check4VPN

ping -n 11 >nul
start C:\Users\username\AppData\Roaming\uTorrent\uTorrent.exe /MINIMIZED

nslookup privateinternetaccess.com 2>&1 | find "Server:" | find "privateinternetaccess.com" >nul
if errorlevel 1 goto LostTheVPN
ping -n 61 >nul
goto StillHaveVPN

taskkill -im uTorrent.exe /t /f
goto Check4VPN

(Just before the PIA VPN comes up, it switches to PIA's nameservers; if the VPN goes down, it switches back to my normal nameservers. I kill uTorrent within a minute which is soon enough for my purposes. When the VPN comes back up, uTorrent is restarted, etc.)

This works quite well, with one exception: killing uTorrent means that it does not quit cleanly and when it is resurrected, it frequently does not complete torrents that were downloading when it was killed. I use RSS feeds and filters extensively to automagically download TV Shows and they are marked as downloaded, yet never complete without manual intervention. This is annoying to me.

BTW- I don't want to use the VPN's kill switch because that would take the entire machine offline and it is only the uTorrent traffic that MUST travel on the VPN. Most of the other traffic is fine with or without the VPN and some of it will not work when the VPN is up. I'm also very much aware that Linux would greatly simplify what I'm trying to do. ATM, it is not an option for this.

Does anyone have a suggestion of how to get what I want without a quit command? If not, can we please get a /quit command?

Thanks for any assistance.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...