[]
        
(Showing Draft Content)

C1.Win.C1Win7Pack.C1TaskbarButton.RegisterFileAssociations

RegisterFileAssociations Method

RegisterFileAssociations(string, string, string, params string[])

Registers file associations for the current application.

Declaration
public void RegisterFileAssociations(string friendlyName, string defaultIcon, string openWithCmd, params string[] extensions)
Public Sub RegisterFileAssociations(friendlyName As String, defaultIcon As String, openWithCmd As String, ParamArray extensions As String())
Parameters
Type Name Description
string friendlyName

A friendly name for the data format, suitable to display to a user.

string defaultIcon

The path to the default icon, such as, "%systemroot%\system32\imageres.dll,15".

string openWithCmd

The command and arguments to be used when opening a shortcut to a document, such as, '"C:\Program Files\Paint.NET\PaintDotNet.exe" "%1"'.

string[] extensions

The extensions to register, such as '.png'.

RegisterFileAssociations(bool, string, string, string, params string[])

Registers file associations for the current application.

Declaration
public void RegisterFileAssociations(bool forCurrentUser, string friendlyName, string defaultIcon, string openWithCmd, params string[] extensions)
Public Sub RegisterFileAssociations(forCurrentUser As Boolean, friendlyName As String, defaultIcon As String, openWithCmd As String, ParamArray extensions As String())
Parameters
Type Name Description
bool forCurrentUser

Specifies whether the file associations should be registered in HKEY_CURRENT_USER, not in HKEY_CLASSES_ROOT which requires elevated privileges.

string friendlyName

A friendly name for the data format, suitable to display to a user.

string defaultIcon

The path to the default icon, such as, "%systemroot%\system32\imageres.dll,15".

string openWithCmd

The command and arguments to be used when opening a shortcut to a document, such as, '"C:\Program Files\Paint.NET\PaintDotNet.exe" "%1"'.

string[] extensions

The extensions to register, such as '.png'.