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

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

Static Public Member Functions

static void Register (FeedTarget target, Model.Capabilities.FileType fileType, IIconStore iconStore, bool machineWide, bool accessPoint=false)
 Registers a file type in the current system. More...
 
static void Unregister (Model.Capabilities.FileType fileType, bool machineWide, bool accessPoint=false)
 Unregisters a file type in the current system. More...
 

Static Public Attributes

const string RegKeyOverrides = @"Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts"
 The HKCU/HKLM registry key backing HKCR.
 
const string RegValueFriendlyName = "FriendlyTypeName"
 The registry value name for friendly type name storage.
 
const string RegValueAppUserModelID = "AppUserModelID"
 The registry value name for application user model IDs (used by the Windows 7 taskbar).
 
const string RegValueContentType = "Content Type"
 The registry value name for MIME type storage.
 
const string RegValuePerceivedType = "PerceivedType"
 The registry value name for perceived type storage.
 
const string RegSubKeyOpenWith = "OpenWithProgIDs"
 The registry subkey containing "open with" ProgID references.
 
const string RegSubKeyMimeType = @"MIME\Database\Content Type"
 The registry subkey below HKEY_CLASSES_ROOT that contains MIME type to extension mapping.
 
const string RegValueExtension = "Extension"
 The registry value name for a MIME type extension association.
 

Detailed Description

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

Member Function Documentation

◆ Register()

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

Registers a file type in the current system.

Parameters
targetThe application being integrated.
fileTypeThe file type to register.
machineWideRegister the file type machine-wide instead of just for the current user.
iconStoreStores icon files downloaded from the web as local files.
accessPointIndicates that the file associations shall become default handlers for their respective types.
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.FileType.Unregister ( Model.Capabilities.FileType  fileType,
bool  machineWide,
bool  accessPoint = false 
)
inlinestatic

Unregisters a file type in the current system.

Parameters
fileTypeThe file type to remove.
machineWideUnregister the file type machine-wide instead of just for the current user.
accessPointIndicates that the file associations were default handlers for their respective types.
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: