[wix-users] Default Program Associated with File Extension

Christopher Painter chrpai at iswix.com
Wed Feb 27 12:39:19 PST 2019


I would handle this outside of the installer.

Create a  product selector utility that owns the file extension and build an MSI or shared components for it.  Design it so that other products can register themselves with the utility.

Include the MSI in the other products bootstrapper or the shared components in their installers.  Then have components in each product that register itself with the product selector.

When the user clicks a file extension the product selector is launched and then it uses the registration data / business logic to decide which registered product to launch.

This should make it super simple for the installer.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Kevin G. Joback via wix-users <wix-users at lists.wixtoolset.org>
Sent: Wednesday, February 27, 2019 2:35 PM
To: wix-users at lists.wixtoolset.org
Cc: Kevin G. Joback
Subject: [wix-users] Default Program Associated with File Extension

We have four products, referred to here as A, B, C and D, that all
manipulate the same types of files. The file types all have what we assume
to be unique extensions, e.g., "mkskbd", "mkscdd", etc. What we would like
to do is have the file types be associated with our programs in the order:
A, B, C, D.



So if someone has product B installed, and double clicks on a .mkskbd file,
we want product B to start and open the file. If someone then installs
product C and double clicks on a .mkskbd file, we still want product B to
start and open the file. However, if someone then installs product A and
double clicks on a .mkskbd file, we would want product A to start and open
the file. The ordering should also be preserved when a product is
uninstalled. (Ideally we would also like all the installed products to be
displayed when the user selects the Open With. menu option.)



Right now it seems that a file extension is associated with the last program
installed. Each product has its own separate bootstrapper and installer
program. Each product records its presence in the registry and can check for
the presence of the other products. Here is the code we currently use to
associate the file extension:



      <Component Id="compProgramExe" Guid="   ">

        <ProgId Id="mksKnowledgeBaseDocuments" Description="An MKS knowledge
base document" Advertise="yes" Icon="iconKBDoc">

          <Extension Id="mkskbd" ContentType="application/mkskbd">

            <Verb Id="open" Command="Open" Sequence="10"
Argument=""%1"" />

          </Extension>

        </ProgId>

      </Component>



(Not sure what the 'sequence' argument does. However, its value is in the
order of A, B, C, D with A being the smallest.)



Any suggestions will be appreciated.



Thank you,

Kevin



Kevin G. Joback, PhD

Molecular Knowledge Systems, Inc.

 <http://www.molecularknowledge.com/> http://www.molecularknowledge.com

Phone: 1-603-472-5315 (USA GMT-4:00)




____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list