Indigo Rose Software
  #1  
Old 10-04-2002
Support Support is offline
Super Moderator
 
Join Date: Jan 2000
Location: Indigo Rose Corporation
Posts: 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.
     

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is On



    All times are GMT -6. The time now is 05:04 PM.


    Powered by vBulletin® Version 3.8.4
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
    Indigo Rose Software