Makes adding/removing and managing custom URL Protocols for Windows easier.
This code example is made automatically referencing url-scheme-manager.dll
.
// create custom uri-scheme info for example
var schemeInfo = new URLSchemeInfo
{
FriendlyName = "Example Scheme",
ProtocolPrefix = "example-scheme",
ProgramPath = "example-program.exe
};
bool hasScheme = SchemeManager.CheckForSchemeInfo(schemeInfo);
// add scheme info to Registry if not already added
if (!hasInstall) SchemeManager.AddSchemeInfo(schemeInfo);
// remove scheme info from Registry if already added
if (hasInstall) SchemeManager.RemoveSchemeInfo(schemeInfo);
URLSchemeInfo
: Uri-scheme info for your programSchemeManager
CheckForSchemeInfo
- Returns
true
orfalse
depending on whether or not the specified uri-scheme info was added to the Registry
- Returns
AddSchemeInfo
- Adds the provided uri-scheme info to the Registry
RemoveSchemeInfo
- Removes the specified uri-scheme info from the Registry