Xceed Zip Compression Library Documentation
SfxExtensionsToAssociate property
Self-Extractor Module reference > Self-Extractor Module properties > SfxExtensionsToAssociate property

Description

The SfxExtensionsToAssociate property lets you assign filename extensions that the self-extractor will register with Windows.

Registering a filename extension allows Windows to recognize files that have a specific filename extension. Windows will be able to show a description of the files ending with a given extension (in Windows Explorer, for example) and execute an application whenever that type of file is opened. Thus, when specifying each filename extension to be registered, you must provide a description and an associated application. The associated application must be able to open the files ending with that extension.

The entire list of extensions to register are placed into one string that you assign to the SfxExtensionsToAssociate property. Each extension to register consists of the extension (do not include the . character), the path + filename of the associated application and the extension's description,. You must separate the extension, file + path name of the associated application and description by using the | character (ASCII value 124) between each one. Each extension to register must be separated by a CR character (ASCII value 13) or the CR/LF characters (ASCII value 13 followed by ASCII value 10). See the example (link at top of page).

The SfxAddExtensionToAssociate method allows you to easily add items to this property's list of extensions to associate.

The following macros are available when specifying a value for the path + filename of the application associated to each extension: %w, %s, %d, %t, %e, %p and %v.

The extensions are registered right after the program group specified by the SfxProgramGroup property is created, and before the text file specified in the SfxReadmeFile property is displayed and the executable specified in the SfxExecuteAfter is executed.

Data type

String

Default value

Empty

Declaration (DLL API)  

UINT XzGetSfxExtensionsToAssociate(HXCEEDZIP hZip, TCHAR* pszBuffer, UINT uMaxLength)

void XzSetSfxExtensionsToAssociate(HXCEEDZIP hZip, const TCHAR* pszValue)

Browsable

Yes

Remarks

Do not associate the .exe extension (you will no longer be able to run programs properly)

Applicable methods

Zip, Convert