Peter Quiring
Peter Quiring

Reputation: 1706

WIX : File Association : How to include app name and product info?

With Wix, I've figured out how to register file associations with ProgId but in Explorer, when you click on "Open with..." or "Choose Program...", I just see my apps EXE filename.

How do I change it to show my apps name without the EXE file extensions?

Also, I noticed other registered apps have info such as the company name in grey under their app's name (such as Microsoft or Document Foundation as shown in pics below). How is that added?

Here are some pics:

enter image description here

enter image description here

And here is my full wix.xml:

<Icon Id="icon.ico" SourceFile="jedit.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico"/>

<!-- Step 1: Define the directory structure -->
<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="APPLICATIONROOTDIRECTORY" Name="jedit"/>
  </Directory>
  <Directory Id="ProgramMenuFolder">
  </Directory>
</Directory>

<!-- Step 2: Add files to your installer package -->
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
  <Component Id="appfiles" Guid="{E73254A5-EFE2-4265-A231-B907FEF4B4C4}">
    <File Id="jedit.jar" Source="jedit.jar"/>
    <File Id="javaforce.jar" Source="javaforce.jar"/>
    <File Id="jedit32.exe" Source="jedit32.exe" KeyPath="yes"/>
    <File Id="jedit64.exe" Source="jedit64.exe"/>
    <ProgId Id="jfEdit.txt" Description="Text Document" Advertise="yes" Icon="icon.ico">
      <Extension Id="txt" ContentType="text/plain">
        <Verb Id="open" Command="Open" Argument="&quot;%1&quot;" />
      </Extension>
    </ProgId>
    <ProgId Id="jfEdit.ini" Description="Configuration Settings" Advertise="yes" Icon="icon.ico">
      <Extension Id="ini" ContentType="text/plain">
        <Verb Id="open" Command="Open" Argument="&quot;%1&quot;" />
      </Extension>
    </ProgId>
    <ProgId Id="jfEdit.properties" Description="Properties" Advertise="yes" Icon="icon.ico">
      <Extension Id="properties" ContentType="text/plain">
        <Verb Id="open" Command="Open" Argument="&quot;%1&quot;" />
      </Extension>
    </ProgId>
  </Component>
</DirectoryRef>

<!-- Step 2b: Add the shortcut to your installer package -->
<DirectoryRef Id="ProgramMenuFolder">
  <Component Id="ApplicationShortcut" Guid="{A986E325-13AB-4FD1-AB3B-4637DF9BC1D9}">
    <Shortcut Id="ApplicationStartMenuShortcut" Name="jfEdit" Description="Java Text Editor" Target="[APPLICATIONROOTDIRECTORY]jedit32.exe"
      WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
    <RegistryValue Root="HKCU" Key="Software\Microsoft\jfEdit" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
  </Component>
</DirectoryRef>

<!-- Step 3: Tell WiX to install the files -->
<Feature Id="MainApplication" Title="Main Application" Level="1">
  <ComponentRef Id="appfiles" />
  <ComponentRef Id="ApplicationShortcut" />
</Feature>

Upvotes: 3

Views: 3108

Answers (1)

taffit
taffit

Reputation: 2099

Take a look at this response from @saschabeaumont that should contain quite all registry keys involved. The name displayed in the Open with...-dialog be the registry key with the name FriendlyAppName. The one displayed in the Open with... context menu entry of a file is in the registry key

HKLM\SOFTWARE\Classes\<YourProgId>\shell\open\FriendlyAppName

I've found those two to be different, however just hacked my registry. It could be that if you use the whole example of the linked answer that it will work perfectly.

The second line is AFAIK the Manufacturer-property in Windows Installer. As soon as the application is registered properly it should also be shown in the Open with... dialog.

Upvotes: 2

Related Questions