DavidMoore / ipfilter

Keeps your preferred Bit Torrent client blocklist up to date to support your privacy and security
https://www.ipfilter.app
MIT License
447 stars 38 forks source link

Can't find where uTorrent is installed #59

Open Peter737 opened 5 years ago

Peter737 commented 5 years ago

When i try to run i get error dialog box. IPFilter.log ipfilter was running fine before i upgraded to current windows 10 1903, using a fresh install. Ive tried latest version of ipfilter 3.0.2.3.

DavidMoore commented 5 years ago

Hi. Please try latest release: https://github.com/DavidMoore/ipfilter/releases/tag/3.0.2.4-beta

Peter737 commented 5 years ago

3.0.2.4 works. It opens and downloads the list with out a problem.

But it doesnt insert the .dat file in my utorrent. In the log file it states it cant find a bit torrent client. im using Utorrent 3.5.5 installed to default path. c:\users...\appdata\roaming\utorrent

DavidMoore commented 4 years ago

Are you using a portable utorrent or just the standard installer?

Peter737 commented 4 years ago

utorrent standard installer. I have updated to 3.0.2.9 but same issue exists.

DavidMoore commented 4 years ago

Are you able to attach the log file with the error for the latest version of 3.0.2.9?

Peter737 commented 4 years ago

my current install is windows 10 20H2 and utorrent 3.5.5.45828. IPFilter.log

DavidMoore commented 4 years ago

Hi!

I'm going to make some changes and add an alternative way to "find" where uTorrent is installed, as it looks like the information is missing from the Windows registry. Hopefully this will do the trick for you.

I'll let you know when update is published; it won't be for a few days I think.

shikulja commented 2 months ago

Wrote a script for uTorrent registration. Checks the current directory and appdata, and applies registry settings.

..if also add BitTorrent registration, can add it to the readme

- To localize strings into English, ask chatgpt. - uTorrent_Register.bat (save in UTF-8 encoding):

@echo off
chcp 65001 >nul
title uTorrent Register V1
setlocal

set "utorrentExe=uTorrent.exe"
set "keyPath=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent"
set "version=3.5.5"
set "localPath=%APPDATA%\uTorrent"

if exist "%CD%\%utorrentExe%" (
    echo uTorrent.exe найден в текущей директории. Идет регистрация параметров реестра...
    set "installLocation=%CD%"
) else if exist "%localPath%\%utorrentExe%" (
    echo uTorrent.exe найден в локальной директории. Идет регистрация параметров реестра...
    set "installLocation=%localPath%"
) else (
    echo uTorrent.exe не найден ни в текущей, ни в локальной директории.
    exit /b
)

rem Регистрация параметров в реестре
reg add "%keyPath%" /v DisplayName /t REG_SZ /d "uTorrent" /f >nul 2>&1
echo Зарегистрировано: DisplayName = uTorrent

reg add "%keyPath%" /v DisplayVersion /t REG_SZ /d "%version%" /f >nul 2>&1
echo Зарегистрировано: DisplayVersion = 3.5.5

reg add "%keyPath%" /v InstallLocation /t REG_SZ /d "%installLocation%" /f >nul 2>&1
echo Зарегистрировано: InstallLocation = %installLocation%

reg add "%keyPath%" /v UninstallString /t REG_SZ /d "%installLocation%\%utorrentExe% /UNINSTALL" /f >nul 2>&1
echo Зарегистрировано: UninstallString = %installLocation%\%utorrentExe% /UNINSTALL

echo Регистрация завершена.
echo Нажмите любую клавишу для выхода...
pause >nul

endlocal

- echo output:

uTorrent.exe найден в локальной директории. Идет регистрация параметров реестра...
Зарегистрировано: DisplayName = uTorrent
Зарегистрировано: DisplayVersion = 3.5.5
Зарегистрировано: InstallLocation = C:\Users\admin\AppData\Roaming\uTorrent
Зарегистрировано: UninstallString = C:\Users\admin\AppData\Roaming\uTorrent\uTorrent.exe /UNINSTALL
Регистрация завершена.
Нажмите любую клавишу для выхода...

- IPfilter log:

IPFilter.exe Information: 0 : Checking for software updates...
IPFilter.exe Information: 0 : Current version: 3.0.5.0
IPFilter.exe Information: 0 : Available version: <no updates>
IPFilter.exe Information: 0 : Found app qBittorrent version v5.0.0rc1 at C:\Program Files\qBittorrent
IPFilter.exe Information: 0 : Found app uTorrent version 3.5.5 at C:\Users\admin\AppData\Roaming\uTorrent
IPFilter.exe Information: 0 : Downloading filter from https://github.com/DavidMoore/ipfilter/releases/download/lists/ipfilter.dat.gz
IPFilter.exe Information: 0 : Online filter's timestamp is 23.09.2024 5:07:19 +00:00
IPFilter.exe Information: 0 : ETag: '"0x8DCDB8D99770DAB"'
IPFilter.exe Information: 0 : Writing cached ipfilter to C:\Users\admin\AppData\Local\IPFilter\ipfilter.dat
IPFilter.exe Information: 0 : Updating app qBittorrent v5.0.0rc1
IPFilter.exe Information: 0 : Writing filter to C:\Users\admin\AppData\Local\qBittorrent\filter\ipfilter.dat
IPFilter.exe Information: 0 : Finished [Writing 411659 entries] in 00:00:00.5053930
IPFilter.exe Information: 0 : Pointing qBittorrent to C:\Users\admin\AppData\Local\qBittorrent\filter\ipfilter.dat
IPFilter.exe Information: 0 : Updating qBittorrent configuration: C:\Users\admin\AppData\Roaming\qBittorrent\qBittorrent.ini
IPFilter.exe Information: 0 : Updating app uTorrent 3.5.5
IPFilter.exe Information: 0 : Writing filter to C:\Users\admin\AppData\Roaming\uTorrent\ipfilter.dat
IPFilter.exe Information: 0 : Finished [Writing 411659 entries] in 00:00:00.5056404
IPFilter.exe Information: 0 : Done. List timestamp: 23.09.2024 8:07:19 +03:00
shikulja commented 2 months ago

V2 added registering current version uTor not forgot save in utf-8 encoding

@echo off
chcp 65001 >nul
title uTorrent Register V2
setlocal

set "utorrentExe=uTorrent.exe"
set "keyPath=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\uTorrent"
set "localPath=%APPDATA%\uTorrent"

if exist "%CD%\%utorrentExe%" (
    echo uTorrent.exe найден в текущей директории. Идет регистрация параметров реестра...
    set "installLocation=%CD%"
) else if exist "%localPath%\%utorrentExe%" (
    echo uTorrent.exe найден в локальной директории. Идет регистрация параметров реестра...
    set "installLocation=%localPath%"
) else (
    echo uTorrent.exe не найден ни в текущей, ни в локальной директории.
    exit /b
)

rem Получение текущей версии uTorrent.exe
for /f "tokens=2 delims==" %%i in ('wmic datafile where "name='%installLocation:\=\\%\\%utorrentExe%'" get Version /value') do set "version=%%i"

if not defined version (
    echo Не удалось получить версию uTorrent.exe.
    exit /b
)

rem Регистрация параметров в реестре
reg add "%keyPath%" /v DisplayName /t REG_SZ /d "uTorrent" /f >nul 2>&1
echo Зарегистрировано: DisplayName = uTorrent

reg add "%keyPath%" /v DisplayVersion /t REG_SZ /d "%version%" /f >nul 2>&1
echo Зарегистрировано: DisplayVersion = %version%

reg add "%keyPath%" /v InstallLocation /t REG_SZ /d "%installLocation%" /f >nul 2>&1
echo Зарегистрировано: InstallLocation = %installLocation%

reg add "%keyPath%" /v UninstallString /t REG_SZ /d "%installLocation%\%utorrentExe% /UNINSTALL" /f >nul 2>&1
echo Зарегистрировано: UninstallString = %installLocation%\%utorrentExe% /UNINSTALL

echo Регистрация завершена.
echo Нажмите любую клавишу для выхода...
pause >nul

endlocal