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
-
objectDefaultProgram
Fields
RegKeyMachineClients
The HKLM registry key for registering applications as clients for specific services.
public const string RegKeyMachineClients = "SOFTWARE\\Clients"
Field Value
RegSubKeyInstallInfo
The name of the registry subkeys containing information about application installation commands and status.
public const string RegSubKeyInstallInfo = "InstallInfo"
Field Value
RegValueHideIconsCommand
The registry value name below RegSubKeyInstallInfo for the command to remove icons/shortcuts to the application.
public const string RegValueHideIconsCommand = "HideIconsCommand"
Field Value
RegValueIconsVisible
The registry value name below RegSubKeyInstallInfo for storing whether the application's icons are currently visible.
public const string RegValueIconsVisible = "IconsVisible"
Field Value
RegValueLocalizedName
The registry value name for localized name storage.
public const string RegValueLocalizedName = "LocalizedString"
Field Value
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
RegValueShowIconsCommand
The registry value name below RegSubKeyInstallInfo for the command to create icons/shortcuts to the application.
public const string RegValueShowIconsCommand = "ShowIconsCommand"
Field Value
Methods
Register(FeedTarget, DefaultProgram, IIconStore, bool, bool)
Registers an application as a candidate for a default program for some service in the current system.
public static void Register(FeedTarget target, DefaultProgram defaultProgram, IIconStore iconStore, bool machineWide, bool accessPoint = false)
Parameters
targetFeedTargetThe application being integrated.
defaultProgramDefaultProgramThe default program information to be registered.
iconStoreIIconStoreStores icon files downloaded from the web as local files.
machineWideboolRegister the application machine-wide instead of just for the current user.
accessPointboolIndicates 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, bool)
Unregisters an application as a candidate for a default program in the current system.
public static void Unregister(DefaultProgram defaultProgram, bool machineWide, bool accessPoint = false)
Parameters
defaultProgramDefaultProgramThe default program information to be removed.
machineWideboolThe application was registered machine-wide instead of just for the current user.
accessPointboolIndicates 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.