Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Registering a File Extension

Updated: 05 Oct 2007
R-Vijay's picture
0 0 Votes
Login to vote

If your application uses special file extensions, you might want to register them so that the application gets started when the icon associated with the file gets double-clicked.

There are special tables for this in the MSI structure (Extension and ProgId). The contents of these tables are used for advertising. You can also make your own registry entries to create application-to-file-extension relations. This example shows how to register the .dvi extensions to be opened with the yap.exe program.

Link the extension .dvi to the DVI.Document class:

Key:   HKLM\SOFTWARE\Classes\.dvi
Value: <default> = "DVI.Document"

Describe the DVI.Document class:

Key:   HKLM\SOFTWARE\Classes\DVI.Document
Value: <default> = "DVI Document"

Select Icon #0 from yap.exe which is in the MSI:

Key:   HKLM\SOFTWARE\Classes\DVI.Document\DefaultIcon
Value: <default> = "[!yap.exe],0"

How to open the .dvi file if it is double clicked in the Explorer:

Key:   HKLM\SOFTWARE\Classes\DVI.Document\shell\open\command
Value: <default> = "[!yap.exe]" "%1"