Table of Contents

Class FileType

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

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

public static class FileType
Inheritance
FileType
Inherited Members

Fields

RegKeyOverrides

The HKCU/HKLM registry key backing HKCR.

public const string RegKeyOverrides = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts"

Field Value

string

RegSubKeyMimeType

The registry subkey below HKEY_CLASSES_ROOT that contains MIME type to extension mapping.

public const string RegSubKeyMimeType = "MIME\\Database\\Content Type"

Field Value

string

RegSubKeyOpenWith

The registry subkey containing "open with" ProgID references.

public const string RegSubKeyOpenWith = "OpenWithProgIDs"

Field Value

string

RegValueAppUserModelID

The registry value name for application user model IDs (used by the Windows 7 taskbar).

public const string RegValueAppUserModelID = "AppUserModelID"

Field Value

string

RegValueContentType

The registry value name for MIME type storage.

public const string RegValueContentType = "Content Type"

Field Value

string

RegValueExtension

The registry value name for a MIME type extension association.

public const string RegValueExtension = "Extension"

Field Value

string

RegValueFriendlyName

The registry value name for friendly type name storage.

public const string RegValueFriendlyName = "FriendlyTypeName"

Field Value

string

RegValuePerceivedType

The registry value name for perceived type storage.

public const string RegValuePerceivedType = "PerceivedType"

Field Value

string

Methods

Register(FeedTarget, FileType, IIconStore, bool, bool)

Registers a file type in the current system.

public static void Register(FeedTarget target, FileType fileType, IIconStore iconStore, bool machineWide, bool accessPoint = false)

Parameters

target FeedTarget

The application being integrated.

fileType FileType

The file type to register.

iconStore IIconStore

Stores icon files downloaded from the web as local files.

machineWide bool

Register the file type machine-wide instead of just for the current user.

accessPoint bool

Indicates that the file associations shall become default handlers for their respective types.

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

Unregisters a file type in the current system.

public static void Unregister(FileType fileType, bool machineWide, bool accessPoint = false)

Parameters

fileType FileType

The file type to remove.

machineWide bool

Unregister the file type machine-wide instead of just for the current user.

accessPoint bool

Indicates that the file associations were default handlers for their respective types.

Exceptions

IOException

A problem occurred while writing to the filesystem or registry.

UnauthorizedAccessException

Write access to the filesystem or registry is not permitted.