Table of Contents

Class ContextMenu

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

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

public static class ContextMenu
Inheritance
ContextMenu
Inherited Members

Fields

Prefix

Prepended before programmatic identifiers used by Zero Install in the registry. This prevents conflicts with non-Zero Install installations.

public const string Prefix = "ZeroInstall.ContextMenu."

Field Value

string

RegKeyClassesAll

The HKCU registry key for registering things for all filesystem objects (files and directories).

public const string RegKeyClassesAll = "AllFilesystemObjects"

Field Value

string

RegKeyClassesDirectories

The HKCU registry key for registering things for all directories.

public const string RegKeyClassesDirectories = "Directory"

Field Value

string

RegKeyClassesExecutableFiles

The HKCU registry key for registering things for different kinds of executable files.

public static readonly string[] RegKeyClassesExecutableFiles

Field Value

string[]

RegKeyClassesFiles

The HKCU registry key for registering things for all files.

public const string RegKeyClassesFiles = "*"

Field Value

string

Methods

Apply(FeedTarget, ContextMenu, IIconStore, bool)

Adds a context menu entry to the current system.

public static void Apply(FeedTarget target, ContextMenu contextMenu, IIconStore iconStore, bool machineWide)

Parameters

target FeedTarget

The application being integrated.

contextMenu ContextMenu

The context menu entry to add.

iconStore IIconStore

A callback object used when the the user is to be informed about the progress of long-running operations such as downloads.

machineWide bool

Add the context menu entry machine-wide instead of just for the current user.

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.

Remove(ContextMenu, bool)

Removes a context menu entry from the current system.

public static void Remove(ContextMenu contextMenu, bool machineWide)

Parameters

contextMenu ContextMenu

The context menu entry to remove.

machineWide bool

Remove the context menu entry machine-wide instead of just for the current user.

Exceptions

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.