Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add qBittorrent to Windows default apps #2517

Closed
john-peterson opened this issue Feb 7, 2015 · 27 comments
Closed

Add qBittorrent to Windows default apps #2517

john-peterson opened this issue Feb 7, 2015 · 27 comments
Labels
Feature request OS: Windows Issues specific to Windows

Comments

@john-peterson
Copy link
Contributor

john-peterson commented Feb 7, 2015

add qBittorrent to windows PC Settings/Search and apps/Defaults https://www.dropbox.com/s/hty3h2yyt4gtmpw/Screenshot%202015-02-08%2003.03.21.png?dl=0 with these values. notice that magnet use the app icon 0. torrent use the file icon 1

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE]

[HKEY_CURRENT_USER\SOFTWARE\Classes]

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.magnet]
@="URL:magnet"
"Content Type"="application/x-magnet"
"URL Protocol"=""

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.magnet\DefaultIcon]
@="\"C:\\Program Files\\qBittorrent\\qbittorrent.exe\",0"

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.magnet\shell]
@="open"

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.magnet\shell\open]

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.magnet\shell\open\command]
@="\"C:\\Program Files\\qBittorrent\\qbittorrent.exe\" \"%1\""

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.torrent]
"Content Type"="application/x-bittorrent"
@="Torrent file"

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.torrent\DefaultIcon]
@="\"C:\\Program Files\\qBittorrent\\qbittorrent.exe\",1"

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.torrent\shell]
@="open"

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.torrent\shell\open]

[HKEY_CURRENT_USER\SOFTWARE\Classes\qBittorrent.torrent\shell\open\command]
@="\"C:\\Program Files\\qBittorrent\\qbittorrent.exe\" \"%1\""

[HKEY_CURRENT_USER\SOFTWARE\RegisteredApplications]
"qBittorrent"="Software\\qBittorrent\\Capabilities"

[HKEY_CURRENT_USER\SOFTWARE\qBittorrent]

[HKEY_CURRENT_USER\SOFTWARE\qBittorrent\Capabilities]
"ApplicationIcon"="C:\\Program Files\\qBittorrent\\qbittorrent.exe,1"
"ApplicationName"="qBittorrent"
"ApplicationDescription"="Torrent downloader"

[HKEY_CURRENT_USER\SOFTWARE\qBittorrent\Capabilities\URLAssociations]
"magnet"="qBittorrent.magnet"

[HKEY_CURRENT_USER\SOFTWARE\qBittorrent\Capabilities\FileAssociations]
".torrent"="qBittorrent.torrent"

[HKEY_CURRENT_USER\SOFTWARE\qBittorrent\shell]

[HKEY_CURRENT_USER\SOFTWARE\qBittorrent\shell\open]

[HKEY_CURRENT_USER\SOFTWARE\qBittorrent\shell\open\command]
@="\"C:\\Program Files\\qBittorrent\\qbittorrent.exe\""

workaround is uninstall capable apps

the workaround to open magnets with qBittorrent until we fix this is to uninstall the magnet capable apps because HKEY_CURRENT_USER\Software\Classes\magnet is ignored if there's a HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\magnet key

@john-peterson john-peterson changed the title Register qBittorrent for magnet protocol in Windows 8 Register that qBittorrent can open magnet links in Windows 8 Feb 7, 2015
@john-peterson john-peterson changed the title Register that qBittorrent can open magnet links in Windows 8 Register magnet link capability for qBittorrent in Windows 8 Feb 7, 2015
@john-peterson john-peterson changed the title Register magnet link capability for qBittorrent in Windows 8 Add qBittorrent to Windows default apps Feb 8, 2015
@sledgehammer999 sledgehammer999 added the OS: Windows Issues specific to Windows label Feb 12, 2015
@UgurGumushan
Copy link

+1

@ngosang
Copy link
Member

ngosang commented Nov 7, 2015

@qbittorrent/qbittorrent-frequent-contributors we need this.

@Chocobo1
Copy link
Member

Chocobo1 commented Nov 7, 2015

@glassez
Copy link
Member

glassez commented Nov 7, 2015

At the time I did it, but @sledgehammer999 rejected it in favor of the old way. See #1410.

@sledgehammer999
Copy link
Member

Rereading my comments, I can't tell why prefer the other... possibly an easier path to intergration.
But even if we are to rewrite the file associations, we'll still need 2 implementations. One for windows 10 and one for the others. Does anyone have Windows 10? How does qbt's current way of associating work there? Is it broken? If yes, then we need re-implementation and in that case we surely can migrate the other versions to the "default apps" system.

@sledgehammer999
Copy link
Member

One for windows 10 and one for the others.

Assuming Windows 10 has a totally different way of associating.

@ngosang
Copy link
Member

ngosang commented Nov 9, 2015

Does anyone have Windows 10?

Me, but you have to provide me the builds.

How does qbt's current way of associating work there? Is it broken?

I don't have association problems. Firefox detects qBittorrent to open magnet and .torrent files. In Explorer .torrent files are opened with qBittorrent.

These are the little problems I found. In Windows 10 there are 3 dialogs to set the default apps, by file type, by protocol and by app.

  1. By file type you see a list of file extensions and the default app. I think this is working now for .torrent file type (I don't remember if I changed it manually).
  2. By protocol. qBittorrent doesn't appear in the list for "magnet protocol". See the image in the first message of this issue.
  3. By app. qBittorrent doesn't appear in the list (list on the left). I think this association window is already in Windows 7 and Windows 8.

More info => http://www.howtogeek.com/223144/how-to-set-your-default-apps-in-windows-10/

But even if we are to rewrite the file associations, we'll still need 2 implementations. One for windows 10 and one for the others.

I think we don't need 2 implementations. Current implementation partially works in Windows 10 and new Keys in the Registry for Windows 10 won't affect previous versions.

@Chocobo1
Copy link
Member

Chocobo1 commented Nov 9, 2015

Aside from the methods ngosang posted, IMO the easiest way:
pic

  • when opening .torrent/magnet files and windows doesn't know how to handle it
  • when a new program register itself for this extension
  • can be invoked by right click menu

I guess #1410 could cover this (just skimmed through).

@sledgehammer999
Copy link
Member

Well, in case I wasn't clear. I don't mind redoing the file associations. I am "over it" for this detail.
If using the new system we can still check if we're the default and prompt the user to make us default(or make Windows prompt the user), then I don't think we lose functionality or user experience.

@glassez
Copy link
Member

glassez commented Nov 9, 2015

As I recall, if any other application register itself as default application in a new way (using Windows Default Apps feature), then we will not be able to change that old way. In short, a new way has priority in Windows 7+ (or even Vista+).

@renzoe
Copy link

renzoe commented Apr 25, 2017

Hi! (two years later) just to point out that this issue is relevant.
Ive been using qbitorrent with windows 10 for almost 1 and 1/2 years with no problem ; opening magnet links. However recently another (chrome web) app claimed the magnet uri.. I chose "yes" initially to test it. However I could never come back to use qbitorrent. Win Regedit: Erasing the chrome URIHandler, all uri magnet references, etc. (so it would not appear as a known protocol on Win10) did not work. In the end magnet uri link opening just stayed on a loop (tring to open and doing nothing) on the browser that opened them (tried FF and Chrome). I could never go back to the "default old" method to make W10 use the magnet-qbittorrent association. Some hidden registry might be broken after a first use of an app for the magnet protocol using the W10 new method. A nightmare.
I think this problem will become more and more common among qbitorrent users on W10.
Finally: the solution of @john-peterson was the only one worked to re-associate magnet-uri with qbitorrent, make qbitorrent appear on the W10 capale magnet uri handlers. :) Could not this be added on future win-installers? Thank you for your time!

@Blackbird88
Copy link

Blackbird88 commented Jun 2, 2018

This issue is still relevant. Thanks to @john-peterson I was finally able to select qBittorrent as magnet handler in Default Programs. Previously qbit was completely absent despite re-installing it and running it in admin mode.
image

@glassez
Copy link
Member

glassez commented Jun 3, 2018

Well, I'll try to resurrect my long-denied PR (#1410). Maybe it's time to use the modern way of setting file associations?..

@kirsan31
Copy link

kirsan31 commented Feb 5, 2019

Windows 7 sp1 x64. Default app was utorrent 2.2.1. After installing qbittorrent 4.1.5 and running it (even with admin rights):
utorrent thinks that he is not default app.
Windows thinks, that utorrent is default app.
qbittorrent doesn't think anything :)
image

@glassez
Copy link
Member

glassez commented Feb 7, 2019

qBittorrent still use old (WinXP) way to regester file associations.
Over the past few years, I've made two attempts to implement support for "Default programs" feature, but they've gone unnoticed, so I dropped it.
Apparently, neither the qBittorrent maintainer (@sledgehammer999) nor other project members (@qbittorrent/frequent-contributors) do not consider this problem worthy of attention.

@kirsan31
Copy link

kirsan31 commented Feb 7, 2019

It's very sadly to hear :-(

@FranciscoPombal
Copy link
Member

@glassez Isn't support for Windows XP (and maybe Vista also) going to be dropped soon (if hasn't been dropped already) anyway?

@klepp0906
Copy link

klepp0906 commented May 19, 2019

ugh. few hours of my sunday fried trying to resolve this on my own.

worked fine with qbittorrent even though I had utorrent, deluge, and tixati installed alongside.

the minute i installed transmission things went to hell. It took over handling magnet links. I checked win10/protocol associations and literally the only one in the list is Transmission. Go figure.

I assume the reg file shared above is going to resolve it, so pre-thanks.

EDIT - that did it. Bless your heart <3

@klepp0906
Copy link

anyone "in the know" regarding under-the-hood stuff, able to provide a "return to default/undo" .reg for the OP's regfile by chance?

@lslqtz
Copy link

lslqtz commented Mar 11, 2022

This also affects Microsoft Edge browser

@Swiper00
Copy link

Here we are in 2022 with this issue still. DO we have an explanation for a newbie at this stuff?

@Nieloha
Copy link

Nieloha commented Nov 7, 2022

still work in 2022 win11.happy but sad

@3rencm
Copy link

3rencm commented May 11, 2023

Issue still persists.

@radonmiser
Copy link

8 years and not fixed lol

image
https://answers.microsoft.com/en-us/windows/forum/all/no-way-to-change-default-link-type-in-windows-11/ecab6146-b0c8-40fa-98f4-25946686cfd4

A similar problem was solved using a registry file but the link is dead so
I can't look inside and figure out ways to apply it here

@xavier2k6
Copy link
Member

PR #19446 should address this.

@xavier2k6
Copy link
Member

Almost 9 years and it's still not fixed???

It's fixed in master & will be in a future release.

@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators Nov 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature request OS: Windows Issues specific to Windows
Projects
None yet
Development

No branches or pull requests