Created
December 24, 2010 14:37
-
-
Save follesoe/754293 to your computer and use it in GitHub Desktop.
Using protocol handlers as a ultra thin layer of integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RegistryKey helpDesk = Registry.ClassesRoot.CreateSubKey("HelpDesk"); | |
helpDesk.SetValue("", "URL:HelpDesk Protocol"); | |
helpDesk.SetValue("URL Protocol", ""); | |
RegistryKey defaultIcon = helpDesk.CreateSubKey("DefaultIcon"); | |
defaultIcon.SetValue("", Path.GetFileName(Application.ExecutablePath)); | |
RegistryKey shell = helpDesk.CreateSubKey("shell"); | |
RegistryKey open = shell.CreateSubKey("open"); | |
RegistryKey command = open.CreateSubKey("command"); | |
command.SetValue("", Application.ExecutablePath + " %1"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment