How does GitHub launch its GitHub Desktop application directly from the browser?
It works even when using Google Chrome. I thought that this was impossible outside of Internet Explorer.
How does GitHub launch its GitHub Desktop application directly from the browser?
It works even when using Google Chrome. I thought that this was impossible outside of Internet Explorer.
Lets assume you register a custom protocl following the guide Registering an Application to a URI Scheme
Using a simple reg file that looks like the following you would register a custom protocol named mytest:
that starts C:\temp\test.bat
when its called.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\mytest]
@="URL:mytest Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\mytest\shell]
[HKEY_CLASSES_ROOT\mytest\shell\open]
[HKEY_CLASSES_ROOT\mytest\shell\open\command]
@="\"C:\\temp\\test.bat\" \"%1\""
Using the following content for test.bat
you would get a cmd window that displays the argument and stays open:
echo %1%
pause
This works straight on your cmd, IE and Firefox. Chrome and Opera would give you a warning that you're about to start an application. This information is also available in this question: Custom protocol handler in chrome
If you look further into it you will find that the github application registers a github-windows protocol using that way. So it's likely that there IS a way available to make it work with chrome. Sadly, right now, I can't dig further into it as the Application doesn't want to react on any browser.
Do you want to launch test.bat?
... Is there any way to change where it says test.bat
into My Program
so that it reads: Do you want to launch My Program?
?
Dec 16, 2016 at 19:27
$1
would be the argument which would be the whole "url" you called.
xbox
link, it asks: DID YOU MEAN TO SWITCH APPS? "Microsoft Edge" is trying to launch "Xbox Gaming"
and I was wondering how it set the name.
Dec 16, 2016 at 22:07
HKCR
and look for an xbox protocol. Searching from the top of HKCR
should work. You could use F3 to jump to the next hit. Also check the Edge Addons/Plugins to see whenever they just register a Addon/Plugin. I haven't done any further digging as the integration simply doesn't work on my system in any kind of browser.
[Program Setup] Add the subkey to your application "SupportedProtocols" HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
Next add a Str Type with the name of each Protocol you want your program to handle, with no values
[Application Setup] Next add/update your application's entry under HKEY_CLASSES_ROOT\Applications\
*If your application needs to save the URL, do the following: Add a Str Type named "SaveURL"
*If your application needs to use the URL, do the following: Add a DWORD Type named "UseURL" Set it's value to 1
The above should enable support for your application