HOWTO: Create a File Association

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Support
    Forum Member
    • Jan 2000
    • 204

    HOWTO: Create a File Association

    HOWTO: Create a File Association

    HOWTO: Create a File Association

    Document ID: IR02017
    The information in this article applies to:
    • Setup Factory 6.0

    SUMMARY

    This article explains how to create an association between a program and a given file type.

    DISCUSSION

    In order to set up a file association we will need to use two Modify Registry actions and an optional third Modify Registry action.

    Example

    This example creates a file association between the file extension *.KQX and the program %AppDir%\MyProgram.exe.

    The first Modify Registry action will link the *.KQX file extension with "KQXEditor" which is another registry key:

    Registry Action: Set Value
    Main Key: HKEY_CLASSES_ROOT
    Sub Key: .KQX
    Value Name:
    Value Type: REG_SZ
    Value Data: KQXEditor

    The "KQXEditor" registry key will tell the operating system what to do with files that have the *.KQX extension. We will tell the operating system to open all files, with the *.KQX extension, with %AppDir%\MyProgram.exe. The next Modify Registry action will create the KQXEditor registry key:

    Registry Action: Set Value
    Main Key: HKEY_CLASSES_ROOT
    Sub Key: KQXEditor\shell\open\command
    Value Name:
    Value Type: REG_SZ
    Value Data: %AppDir%\MyProgram.exe "%1"

    The third (and optional) step is to associate an icon with files using the *.KQX file extension. We will set the icon for all KQX files to be the same icon that our KQXEditor (%AppDir%\MyProgram.exe) uses:

    Registry Action: Set Value
    Main Key: HKEY_CLASSES_ROOT
    Sub Key: KQXEditor\DefaultIcon
    Value Name:
    Value Type: REG_SZ
    Value Data: %AppDir%\MyProgram.exe,0

    MORE INFORMATION

    For more information please see the following topics in the Setup Factory 6.0 Help:

  • Command Reference | Actions | Individual Actions | Modify Registry
  • KEYWORDS: Setup Factory 6.0, File Association


    Last reviewed: October 4, 2002
    Copyright © 2002 Indigo Rose Corporation. All rights reserved.
  • artistscope
    Indigo Rose Customer
    • Sep 2004
    • 166

    #2
    No. We are not registering mimetype.

    After regsvr32 LAXSplitter.ax, when I search the registry for "LaxSplitter.ax" I find no entries defined as I expected, just a few InProcServer32 entries... several with different CLSID.
    ArtistScope - Copy Protection & DRM Software

    Comment

    • Working...
      X