Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to register a file extension with Installscrip


1 reply to this topic

carlost

carlost
  • Members
  • 1 posts

Posted 14 October 2002 - 15:08

(Sorry, my english is not good)

Do you know how to register a file extension using Installscript?

Thanks in advance.

Carlos

hambone

hambone
  • Members
  • 206 posts

Posted 16 October 2002 - 18:58

i found the following at:
http://isg.ee.ethz.c...det/msi.en.html

i know it does not give you the installshield script but it does identify the registry keys required to perform the association.  with a bit of effort you should be able to convert :o)

hope it helps...



Registering a File Extension

If your application uses special file extensions, you might want to register them so that the application gets started when the file gets double clicked, and that there is an icon associated with the file. There are special tables for this in the msi structure (Extension and ProgId) their contents is also used for advertising. In Wise 3.5 there is even a GUI for editing the Contents of the Extensions table. No gui though for the ProgID table which sets up icons for file extensions.

You can also make your own registry entries to create application to file extension relations. The 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"