Table of Contents

Class UrlProtocol

Namespace
ZeroInstall.DesktopIntegration.Windows
Assembly
ZeroInstall.DesktopIntegration.dll

Contains control logic for applying UrlProtocol and UrlProtocol on Windows systems.

public static class UrlProtocol
Inheritance
UrlProtocol
Inherited Members

Fields

ProtocolIndicator

The registry value name used to indicate that a programmatic identifier is actually a ULR protocol handler.

public const string ProtocolIndicator = "URL Protocol"

Field Value

string

RegKeyUserVistaUrlAssoc

The HKCU registry key where Windows Vista and newer store URL protocol associations.

public const string RegKeyUserVistaUrlAssoc = "Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations"

Field Value

string

Methods

Register(FeedTarget, UrlProtocol, IIconStore, bool, bool)

Registers a URL protocol in the current system.

public static void Register(FeedTarget target, UrlProtocol urlProtocol, IIconStore iconStore, bool machineWide, bool accessPoint = false)

Parameters

target FeedTarget

The application being integrated.

urlProtocol UrlProtocol

The URL protocol to register.

iconStore IIconStore

Stores icon files downloaded from the web as local files.

machineWide bool

Register the URL protocol machine-wide instead of just for the current user.

accessPoint bool

Indicates that the handler shall become the default handler for the protocol.

Exceptions

OperationCanceledException

The user canceled the task.

IOException

A problem occurred while writing to the filesystem or registry.

WebException

A problem occurred while downloading additional data (such as icons).

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.

Unregister(UrlProtocol, bool, bool)

Unregisters a URL protocol in the current system.

public static void Unregister(UrlProtocol urlProtocol, bool machineWide, bool accessPoint = false)

Parameters

urlProtocol UrlProtocol

The URL protocol to remove.

machineWide bool

Unregister the URL protocol machine-wide instead of just for the current user.

accessPoint bool

Indicates that the handler was the default handler for the protocol.

Exceptions

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.