Windows 8.1 does not wait utorrent to close completely when the computer restarts or shuts down.
So utorrent always comes into check mode for files that are being downloaded.
I wonder if there are any script that intercepts the Windows shutdown process, forcing windows to wait for the complete closure of utorrent to only then proceed with the shutdown?
Force close utorrent before shutdown or restart?
-
- Posts: 21
- Joined: 22 Mar 2016, 18:26
- Masonjar13
- Posts: 1555
- Joined: 20 Jul 2014, 10:16
- Location: Не Россия
- Contact:
Re: Force close utorrent before shutdown or restart?
Certainly.
This does not force-kill utorrent, it's a soft-close. winWaitClose will wait indefinitely for utorrent to close, then continue with the shutdown/restart.
Code: Select all
#persistent
dllCall("kernel32.dll\SetProcessShutdownParameters","UInt",0x4FF,"UInt",0)
onMessage(0x11,"WM_QUERYENDSESSION")
return
WM_QUERYENDSESSION(wParam,lParam){
winClose, ahk_exe utorrent.exe
winWaitClose
return 1
}
-
- Posts: 21
- Joined: 22 Mar 2016, 18:26
Re: Force close utorrent before shutdown or restart?
Thank you, but it seems that this script does not work.Masonjar13 wrote:Certainly.This does not force-kill utorrent, it's a soft-close. winWaitClose will wait indefinitely for utorrent to close, then continue with the shutdown/restart.Code: Select all
#persistent dllCall("kernel32.dll\SetProcessShutdownParameters","UInt",0x4FF,"UInt",0) onMessage(0x11,"WM_QUERYENDSESSION") return WM_QUERYENDSESSION(wParam,lParam){ winClose, ahk_exe utorrent.exe winWaitClose return 1 }
It seems it is not closing utorrent before restarting computer.
Even with this script running, when I restart the computer, utorrent will verify the files that were in dowloand, that is, nothing has changed.
Re: Force close utorrent before shutdown or restart?
Old I know but I ended up here seeking the solution for a similar problem, the solution for me was enabling hidden window detection and toggling the "close to tray" option in uTorrent. So below is my working script for launching a specific online game and above that an excerpt of relevant parts:
Code: Select all
DetectHiddenWindows, On
WinClose µTorrent ;Definitely not 'uTorrent'
Code: Select all
;@ECHO OFF this script was born a .bat, they grow up so fast :')
#NoEnv
#Warn
#SingleInstance force
DetectHiddenWindows, On
run SpeCopy.ahk ;Separate script to switch default audio device (to SPEakers)
WinClose µTorrent ;Definitely not 'uTorrent'
run, taskkill /f /im Dropbox.exe
run, taskkill /f /im Flux.exe
run, taskkill /f /im "Google Photos Backup.exe"
run, C:\Windows\System32\powercfg.exe /s 4e878fc9... unique code for high performance mode
run, steam://rungameid/252950 ;yes very hardcore gamer I know
;taskkill /f /im "Explorer.exe" ;Used this on Laptop to squeeze even harder for performance
;taskkill /f /im "Chrome.exe" ;As above just to make sure Chrome was closed but corrupted profiles or somethign every so often, will replace with a soft close when cbf
- Masonjar13
- Posts: 1555
- Joined: 20 Jul 2014, 10:16
- Location: Не Россия
- Contact:
Re: Force close utorrent before shutdown or restart?
I hadn't realized that this was unsolved. For historical purposes:
You can force-close an application using Process.
You can force-close an application using Process.
Code: Select all
#persistent
dllCall("kernel32.dll\SetProcessShutdownParameters","UInt",0x4FF,"UInt",0)
onMessage(0x11,"WM_QUERYENDSESSION")
return
WM_QUERYENDSESSION(wParam,lParam){
process,close,utorrent.exe
return 1
}
Who is online
Users browsing this forum: Lamron750 and 246 guests