Table of Contents

Class DefaultProgram

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

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

public static class DefaultProgram
Inheritance
DefaultProgram
Inherited Members

Fields

RegKeyMachineClients

The HKLM registry key for registering applications as clients for specific services.

public const string RegKeyMachineClients = "SOFTWARE\\Clients"

Field Value

string

RegSubKeyInstallInfo

The name of the registry subkeys containing information about application installation commands and status.

public const string RegSubKeyInstallInfo = "InstallInfo"

Field Value

string

RegValueHideIconsCommand

The registry value name below RegSubKeyInstallInfo for the command to remove icons/shortcuts to the application.

public const string RegValueHideIconsCommand = "HideIconsCommand"

Field Value

string

RegValueIconsVisible

The registry value name below RegSubKeyInstallInfo for storing whether the application's icons are currently visible.

public const string RegValueIconsVisible = "IconsVisible"

Field Value

string

RegValueLocalizedName

The registry value name for localized name storage.

public const string RegValueLocalizedName = "LocalizedString"

Field Value

string

RegValueReinstallCommand

The registry value name below RegSubKeyInstallInfo for the command to set an application as the default program.

public const string RegValueReinstallCommand = "ReinstallCommand"

Field Value

string

RegValueShowIconsCommand

The registry value name below RegSubKeyInstallInfo for the command to create icons/shortcuts to the application.

public const string RegValueShowIconsCommand = "ShowIconsCommand"

Field Value

string

Methods

Register(FeedTarget, DefaultProgram, IIconStore, bool)

Registers an application as a candidate for a default program for some service in the current system. This can only be applied machine-wide, not per user.

public static void Register(FeedTarget target, DefaultProgram defaultProgram, IIconStore iconStore, bool accessPoint = false)

Parameters

target FeedTarget

The application being integrated.

defaultProgram DefaultProgram

The default program information to be registered.

iconStore IIconStore

Stores icon files downloaded from the web as local files.

accessPoint bool

Indicates that the program should be set as the current default for the service it provides.

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(DefaultProgram, bool)

Unregisters an application as a candidate for a default program in the current system. This can only be applied machine-wide, not per user.

public static void Unregister(DefaultProgram defaultProgram, bool accessPoint = false)

Parameters

defaultProgram DefaultProgram

The default program information to be removed.

accessPoint bool

Indicates that the program was set as the current default for the service it provides.

Exceptions

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.