If you want to have uTorrent running without having to log on, you'll either have to set up a little script that shuts down any existing instances down when you start it in your session (and then another to start it as a service again when you log off), or interact with it exclusively over the web interface.
The shutdown can be instant (force-killing the process) or slow but safe (sending a close signal and waiting for it to finish up). TASKKILL /im utorrent.exe
will close it, and adding /F
will force-kill it. A batch file like this will combine the two, force-killing after 30 seconds.
REM Seconds to wait
set _timer=30
taskkill /im utorrent.exe
:testloop
REM Sleep 1 second
PING -n 2 127.0.0.1>nul
set /a _timer=_timer-1
if "%_timer%"=="0" goto :finish
tasklist /FI "IMAGENAME eq utorrent.exe" 2>NUL | find /I /N "utorrent.exe">NUL
if "%ERRORLEVEL%"=="0" goto :testloop
:finish
taskkill /im utorrent.exe /f
c:\path\to\uTorrent.exe
To get it to restart when you log off or close it, modify the Task slightly to first check if uTorrent.exe is running, and then launch it if it isn't. A batch file like this is sufficient:
tasklist /FI "IMAGENAME eq utorrent.exe" 2>NUL | find /I /N "utorrent.exe">NUL
if "%ERRORLEVEL%"=="1" c:\path\to\uTorrent.exe
Have it run every ten minutes or so. The chance of a conflict with the previous batch is possible, but extremely unlikely.
The web interface was made specifically for this use case, but it's not nearly as convenient to use as the native GUI, especially not for adding torrents. I'm not aware of any native GUI torrent clients that are split into client/server, all of them seem to have web interfaces instead. If uTorrent was split in two, it'd be perfect.
this is not possible, the process, started via task scheduler runs into a different session. – magicandre1981 – 2015-02-07T16:45:25.067
@magicandre1981 is there an alternative way to make it run into the same session? – Omar – 2015-02-08T04:31:00.630
not possible when you run µTorrent via Task scheduler at Windows start. The first user now becomes session 1 and your tool runs in session 0. This is called session 0 isolation to make Windows (since Vista) more secure – magicandre1981 – 2015-02-08T07:35:41.520
Have you tried creating a shortcut to utorrent and putting it in the startup folder in start menu? The entries there get executed on user login. It's not exactly the same as starting a program on windows start, but they will be executed as the user. – Valentin – 2015-04-28T21:58:02.683
Yes, it doesn't make uTorrent start before user login! – Omar – 2015-05-01T15:55:17.563