Skip to content

Instantly share code, notes, and snippets.

@madaboutcode
Last active August 29, 2015 14:10
Show Gist options
  • Save madaboutcode/9c0c1fa7adc251a37d49 to your computer and use it in GitHub Desktop.
Save madaboutcode/9c0c1fa7adc251a37d49 to your computer and use it in GitHub Desktop.
Windows custom protocol handlers
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.button {
background: #65a9d7;
display: inline-block;
padding: 10px 20px;
text-decoration: none;
width: auto;
color: white;
font-family: Verdana;
}
</style>
<h3>Installation</h3>
<p>
Download this registry file and install it by double clicking on it. <a href="install-hm-handler.reg">install-hm-handler.reg</a><br />
</p><p>
Once it is installed, it registers a custom protocol handler for urls of the form <i>hm://something</i> to be opened with notepad.exe
</p>
<h3>Example</h3>
<p>
<a href="hm://some-argument" class="button">Launch Desktop App</a>
</p>
<p>
Documentation here : <a href="http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx">Registering an Application to a URI Scheme</a>
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\hm]
@="URL:HM Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\hm\shell]
[HKEY_CLASSES_ROOT\hm\shell\open]
[HKEY_CLASSES_ROOT\hm\shell\open\command]
@="C:\\Windows\\System32\\notepad.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment