Zero Install .NET API 2.20.0
ZeroInstall.DesktopIntegration.Windows.DefaultProgram Class Reference

Contains control logic for applying Model.Capabilities.DefaultProgram and AccessPoints.DefaultProgram on Windows systems. More...

Static Public Member Functions

static void Register (FeedTarget target, Model.Capabilities.DefaultProgram defaultProgram, IIconStore iconStore, bool accessPoint=false)
 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. More...
 
static void Unregister (Model.Capabilities.DefaultProgram defaultProgram, bool accessPoint=false)
 Unregisters an application as a candidate for a default program in the current system. This can only be applied machine-wide, not per user. More...
 

Static Public Attributes

const string RegKeyMachineClients = @"SOFTWARE\Clients"
 The HKLM registry key for registering applications as clients for specific services.
 
const string RegValueLocalizedName = "LocalizedString"
 The registry value name for localized name storage.
 
const string RegSubKeyInstallInfo = "InstallInfo"
 The name of the registry subkeys containing information about application installation commands and status.
 
const string RegValueReinstallCommand = "ReinstallCommand"
 The registry value name below RegSubKeyInstallInfo for the command to set an application as the default program.
 
const string RegValueShowIconsCommand = "ShowIconsCommand"
 The registry value name below RegSubKeyInstallInfo for the command to create icons/shortcuts to the application.
 
const string RegValueHideIconsCommand = "HideIconsCommand"
 The registry value name below RegSubKeyInstallInfo for the command to remove icons/shortcuts to the application.
 
const string RegValueIconsVisible = "IconsVisible"
 The registry value name below RegSubKeyInstallInfo for storing whether the application's icons are currently visible.
 

Static Package Functions

static void ToggleIconsVisible (Model.Capabilities.DefaultProgram defaultProgram, bool iconsVisible)
 Toggles the registry entry indicating whether icons for the application are currently visible. More...
 

Detailed Description

Contains control logic for applying Model.Capabilities.DefaultProgram and AccessPoints.DefaultProgram on Windows systems.

Member Function Documentation

◆ Register()

static void ZeroInstall.DesktopIntegration.Windows.DefaultProgram.Register ( FeedTarget  target,
Model.Capabilities.DefaultProgram  defaultProgram,
IIconStore  iconStore,
bool  accessPoint = false 
)
inlinestatic

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.

Parameters
targetThe application being integrated.
defaultProgramThe default program information to be registered.
iconStoreStores icon files downloaded from the web as local files.
accessPointIndicates that the program should be set as the current default for the service it provides.
Exceptions
OperationCanceledExceptionThe user canceled the task.
IOExceptionA problem occurred while writing to the filesystem or registry.
WebExceptionA problem occurred while downloading additional data (such as icons).
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

◆ ToggleIconsVisible()

static void ZeroInstall.DesktopIntegration.Windows.DefaultProgram.ToggleIconsVisible ( Model.Capabilities.DefaultProgram  defaultProgram,
bool  iconsVisible 
)
inlinestaticpackage

Toggles the registry entry indicating whether icons for the application are currently visible.

Parameters
defaultProgramThe default program information to be modified.
iconsVisibletrue if the icons are currently visible, false if the icons are currently not visible.

◆ Unregister()

static void ZeroInstall.DesktopIntegration.Windows.DefaultProgram.Unregister ( Model.Capabilities.DefaultProgram  defaultProgram,
bool  accessPoint = false 
)
inlinestatic

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

Parameters
defaultProgramThe default program information to be removed.
accessPointIndicates that the program was set as the current default for the service it provides.
Exceptions
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

The documentation for this class was generated from the following file: