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

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

Static Public Member Functions

static void Register (FeedTarget target, Model.Capabilities.AutoPlay autoPlay, IIconStore iconStore, bool machineWide, bool accessPoint=false)
 Adds an AutoPlay handler registration to the current system. More...
 
static void Unregister (Model.Capabilities.AutoPlay autoPlay, bool machineWide, bool accessPoint=false)
 Removes an AutoPlay handler registration from the current system. More...
 

Static Public Attributes

const string RegKeyHandlers = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers"
 The HKCU/HKLM registry key for storing AutoPlay handlers.
 
const string RegKeyAssocs = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers"
 The HKCU/HKLM registry key for storing AutoPlay handler associations.
 
const string RegKeyChosenAssocs = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers"
 The HKCU registry key for storing user-selected AutoPlay handlers.
 
const string RegValueProgID = "InvokeProgID"
 The registry value name for storing the programmatic identifier to invoke.
 
const string RegValueVerb = "InvokeVerb"
 The registry value name for storing the name of the verb to invoke.
 
const string RegValueProvider = "Provider"
 The registry value name for storing the name of the application providing the AutoPlay action.
 
const string RegValueDescription = "Action"
 The registry value name for storing the description of the AutoPlay action.
 
const string RegValueIcon = "DefaultIcon"
 The registry value name for storing the icon for the AutoPlay action.
 

Detailed Description

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

Member Function Documentation

◆ Register()

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

Adds an AutoPlay handler registration to the current system.

Parameters
targetThe application being integrated.
autoPlayThe AutoPlay handler information to be applied.
machineWideRegister the handler machine-wide instead of just for the current user.
iconStoreStores icon files downloaded from the web as local files.
accessPointIndicates that the handler should become the default handler for all Model.Capabilities.AutoPlay.Events.
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.

◆ Unregister()

static void ZeroInstall.DesktopIntegration.Windows.AutoPlay.Unregister ( Model.Capabilities.AutoPlay  autoPlay,
bool  machineWide,
bool  accessPoint = false 
)
inlinestatic

Removes an AutoPlay handler registration from the current system.

Parameters
autoPlayThe AutoPlay handler information to be removed.
machineWideRemove the handler machine-wide instead of just for the current user.
accessPointIndicates that the handler should was the default handler for all Model.Capabilities.AutoPlay.Events.
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: