Jump to content

Shutting uTorrent down via command line


Kincaid

Recommended Posts

Posted

Hi, I have to reboot my computer from time to time. I would like to create a batch file that shuts uTorrent down and reboots my PC. Reboot is no problem, but how do I shut uTorrent down? Taskkill does only work with -f but I don't want to force quit. I couldn't find any api calls that would help and I can't write a script or something. Can anyone help me with this?

Posted

Turn off "close to tray" in the preferences (just minimize instead), then you can use taskkill /IM utorrent.exe to close it.

Also disable the exit confirmation dialog.

Posted

Ok, this works. Thank you.

 

But I have another question: uTorrent is not responding from time to time. I thought i could write a batch file that checks if utorrent.exe is responding and if not kills it and restarts it. This is the line:

taskkill /im "utorrent.exe" /fi "STATUS eq NOT RESPONDING" /f >nul && start "" "C:\Program Files\uTorrent\uTorrent.exe"

I can't really test this without waiting for utorrent to stop working but when I run this batch when utorrent is responding utorrent becomes the active window. I thought as long as utorrent is responding nothing should happen? I added a task in the scheduler that runs this batch every 15 minutes. After an hour or two I checked the tasklist and there where a couple of utorrent.exe tasks which can only be killed with /f. Is there something wrong with my code? How do I check if utorrent is responding and, if not, kill it and then start it again?

 

 

Edit: I tried this now:

@ECHO OFFtaskkill /f /fi "imagename eq utorrent.exe" /fi "status ne running" | findstr ERFOLGREICH > NULif errorlevel 1 (exit) else (start "" "C:\Program Files\uTorrent\uTorrent.exe")

When I run this manually when utorrent is responding nothing happens. But when I start the task in the scheduler after some time the gui and the tray icon are gone but tasklist shows utorrent.exe.

  • 10 months later...
Posted

Are you having a program where utorrent is loading when Windows is running? If so you can uncheck the box and it will not load when Windows load. It's not that hard to know how to properly configure utorrent apps.

Archived

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

×
×
  • Create New...