general Bitcoin URL handling on Windows #981

issue Diapolo opened this issue on March 24, 2012
  1. Diapolo commented at 2:04 PM on March 24, 2012: none

    In Windows, the default behavior is that certain protocolls (i.e. mailto) are linked to a certain executable. I setup the bitcoin protocol and linked that to the current 0.6 RC4 Bitcoin-Qt.exe via a Registry file:


    REGEDIT4

    [HKEY_CLASSES_ROOT\bitcoin] @="URL:bitcoin Protocol" "URL Protocol"="" "FriendlyTypeName"="Bitcoin URL"

    [HKEY_CLASSES_ROOT\bitcoin\shell]

    [HKEY_CLASSES_ROOT\bitcoin\shell\open]

    [HKEY_CLASSES_ROOT\bitcoin\shell\open\command] @=""E:\Bitcoin\Client\bitcoin-qt.exe" "%1""


    Afterwards I used Firefox to browse to: http://blockchain.info/uri Now if I click the upper link I'm asked to confirm opening of the Bitcoin-Qt.exe, which starts and offers to add an address + label to my addressbook. So far so good, but another click on that link does NOT use the same running instance, it tries to start a new one, which will fail (same data-dir and same port).

    Does the Win-Installer register a protocol handler?

    I'm not sure if that's a bug in the client itself, but at least it would be interesting to know if someone has some thoughts on this.

    Dia

  2. TheBlueMatt commented at 4:10 PM on March 24, 2012: member

    If its trying to open a new instance, there is some issue with the build that you are running's handling of the IPC stuff. Is this a custom build or a released one?

    Does the Win-Installer register a protocol handler? <-- Yes

  3. Diapolo commented at 4:26 PM on March 24, 2012: none

    I'm talking about the official 0.6 RC4 build.

    Can you point me to the code or the .reg file that is used by the installer version for creating the protocol handler. It could well be, that my manual aproach (see above) is not perfect, as I took a Mozilla How-To as information source.

  4. Diapolo commented at 4:56 PM on March 25, 2012: none

    Well, that one does a protocol registration for bitcoin.exe? Is Bitcoin-Qt.exe called bitcoin.exe in the Win-Installer-package? If not, that should not work ...

  5. TheBlueMatt commented at 5:24 PM on March 25, 2012: member

    Heh, wow thats out of date, see #985

  6. Diapolo commented at 5:44 PM on March 25, 2012: none

    That was a fast fix, nice!

    Is the difference between open a new instance and using the current one this here: bitcoin-qt.exe "$$1" vs. bitcoin-qt.exe "%1"?

  7. TheBlueMatt commented at 5:56 PM on March 25, 2012: member

    No, currently the whole boost::interprocess IPC stuff isnt working at all, Im looking into it (because it used to work...)

  8. Diapolo commented at 7:26 PM on March 25, 2012: none

    Was that a statement for official 0.6 RC4 or has it sth. to do with the #956 issue and my fix for it?

  9. TheBlueMatt commented at 7:38 PM on March 25, 2012: member

    It appears to be a bug in boost (affecting 0.6rc4 and probably all 0.6rcs). Note that it causes both this issue and #956

  10. Diapolo commented at 7:51 PM on March 25, 2012: none

    Can you give some more details to me / us?

    I have the impression, that Bitcoin-Qt on Windows needs to be a single instance application in order to get URL handling working (again). Only one application can be registered and is listed in the registry, now lets say 2 clients are running with different datadir and port. You click on a bitcoin: Link, what should happen? Which client is the receiver of the URL?

    I would say I have one running instance, click a link and the client comes out of the tray or taskbar and shows me the corresponding dialogs.

  11. TheBlueMatt referenced this in commit 1b327daeb5 on Mar 25, 2012
  12. Diapolo commented at 2:24 PM on March 26, 2012: none

    Is there any documentation in which format websites should use bitcoin: links or which parameters in the URL are allowed?

  13. sipa commented at 2:49 PM on March 26, 2012: member
  14. Diapolo commented at 7:02 AM on March 28, 2012: none

    I close this for now, as I'm currently working on that part of the code and the initial questions got answered :).

  15. Diapolo closed this on Mar 28, 2012

  16. TheBlueMatt referenced this in commit 4e6638f4af on Jun 9, 2012
  17. suprnurd referenced this in commit 0597900c16 on Dec 5, 2017
  18. ptschip referenced this in commit 2bc0640feb on Mar 7, 2018
  19. Bushstar referenced this in commit c7f35ec1db on Aug 8, 2019
  20. lateminer referenced this in commit 92de4b81b3 on Oct 30, 2019
  21. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me