Adding program to “Open With” menu for a file extension on Windows 8 - wix

Similar questions to this one have been asked before but I believe that things have changed with Windows 8 so that this is not a duplicate.
Method 1
What looks like the best windows desktop documentation suggests that a program uses OpenWithProgids. Although some MSDN documentation reports this registry key is only supported in Windows XP, other documentation indicates it is somehow used with the Windows Store, introduced with Windows 8. Just looking on my computer, most programs still use this registry key, so I plan to add it rather than only be confused by the documentation.
Method 2
In the Application Registration section of the window desktop documentation the suggested method for adding a program to the “Open With” context menu is using a SupportedTypes registry key.
Summary
Both methods work on Windows 7, but neither seems to be working on Windows 8.
Some may suggest trying out the “Default Programs” interface but, although it’s a good idea anyway, the documentation on it generally points you elsewhere for getting on the “Open With” menu. I would generally expect an application to be and stay on the “Open With” menu regardless of whether it is currently the default program.
Still, staying on the Default Programs topic, in this thread someone “stumbled” into a solution where setting a program as the default once added it to the “Open With” menu. I unfortunately do not get the same behavior on my system, with my file extensions.
<Component Id="ConsoleApplication" Guid="*">
<File Id="ConsoleApplication.exe" Name='ConsoleApplication.exe' DiskId='1'
Source='$(var.ConsoleApplication.TargetDir)/ConsoleApplication.exe'
KeyPath='yes' />
<!-- ProgID (always required) -->
<RegistryValue Root="HKLM"
Key="SOFTWARE\Classes\ConsoleApplication.MyProgId"
Name="FriendlyTypeName"
Value="ConsoleApplication ProgID"
Type="string" />
<ProgId Id="ConsoleApplication.MyProgId"
Description="ConsoleApplication MyProgId"
Advertise="yes">
<Extension Id="xyz">
<Verb Id="open"
Command="Open"
Argument=""%1""/>
</Extension>
</ProgId>
<!-- Method 1: Add to the "Open With" menu using a ProgID -->
<RegistryValue Root="HKLM"
Key="SOFTWARE\Classes\.xyz\OpenWithProgids"
Name="ConsoleApplication.MyProgId"
Value=""
Type="string" />
<!-- Method 2: Add to the "Open With" menu using "Application Registration" -->
<RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConsoleApplication.exe"
Value="[!ConsoleApplication.exe]"
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConsoleApplication.exe"
Name="Path"
Value="[INSTALLFOLDER]"
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\Classes\Applications\ConsoleApplication.exe\SupportedTypes"
Name=".xyz"
Value=""
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\Classes\Applications\ConsoleApplication.exe\shell\open"
Name="FriendlyAppName"
Value="My FriendlyAppName"
Type="string" />
<!-- "Default Programs" registration -->
<RegistryValue Root="HKLM"
Key="SOFTWARE\ConsoleApplication\Capabilities"
Name="ApplicationDescription"
Value="Console application."
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\ConsoleApplication\Capabilities"
Name="ApplicationIcon"
Value="[INSTALLFOLDER]ConsoleApplication.exe,0"
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\ConsoleApplication\Capabilities"
Name="ApplicationName"
Value="ConsoleApplication"
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\ConsoleApplication\Capabilities\DefaultIcon"
Value="[INSTALLFOLDER]ConsoleApplication.exe,0"
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\ConsoleApplication\Capabilities\FileAssociations"
Name=".xyz"
Value="ConsoleApplication.MyProgId"
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\ConsoleApplication\Capabilities\shell\open\command"
Value=""[INSTALLFOLDER]ConsoleApplication.exe" "%1""
Type="string" />
<RegistryValue Root="HKLM"
Key="SOFTWARE\RegisteredApplications"
Name="ConsoleApplication"
Value="SOFTWARE\ConsoleApplication\Capabilities"
Type="string" />
</Component>

Read this:
https://superuser.com/questions/690106/add-items-to-the-open-with-list-in-windows-8
This is apparently new in Win 8, but unless you provide the two properties, the application does not appear on the menu.

Related

WiX: How to restart Windows Explorer to install / uninstall a shell extension

I am trying to write a WiX installer that includes a managed icon shell extension (using SharpShell). I've finally figured out how to register it via Wix (I couldn't get the SharpShell registration manager to work whenn called via WiX).
During installation, the following dialog appears:
If I select "Ignore", the icon shell extension is successfully installed and Window Explorer picks up the change immediately. I'm not sure which files that its detecting as "In Use".
During uninstall, the following dialog appears:
If you select the "Automatically close and attempt to restart" option, it closes Windows Explorer, but it does not restart at the end of the installation. I have to manually restart it via task manager.
WiX Fragment Definition
The WiX fragment that defines the shell extension installation is shown below:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util='http://schemas.microsoft.com/wix/UtilExtension'>
<!-- This fragment was originally generated using heat with the following command line:
"$(WIX)bin\heat.exe" dir "$(SolutionDir)Icon ShellExtension\bin\$(ConfigurationName)" -dr IconShellExtensionDIR -cg IconShellExtension -var var.IconShellExtension.TargetDir -fips -g1 -gg -sfrag -srd -suid -template fragment -t "$(ProjectDir)AssemblyFileFilter.xslt" -out "$(ProjectDir)Fragments\IconShellExtension.wxs"
It was then subsequently manually modified, as file associations are defined in a different component the default icon entry had to be removed.
-->
<Fragment>
<DirectoryRef Id="IconShellExtensionDIR">
<Component Id="IconShellExtension.dll" Guid="D609F6F2-52FB-4153-8D6A-3E2B7F8C4647">
<Class Id="{A1C3600C-F3E5-300E-8167-541C62083DAA}" Context="InprocServer32" Description="IconShellExtension.UaProjectIconHandler" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="IconShellExtension.UaProjectIconHandler" Description="UA Project File Icon Handler" />
</Class>
<util:RestartResource ProcessName="explorer.exe"/>
<File Id="IconShellExtension.dll" KeyPath="yes" Source="$(var.IconShellExtension.TargetDir)\IconShellExtension.dll" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32\1.0.0.0" Name="Class" Value="IconShellExtension.UaProjectIconHandler" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32\1.0.0.0" Name="Assembly" Value="IconShellExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9e9ad08f31c5e4fb" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32\1.0.0.0" Name="CodeBase" Value="file:///[#IconShellExtension.dll]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32" Name="Class" Value="IconShellExtension.UaProjectIconHandler" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32" Name="Assembly" Value="IconShellExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9e9ad08f31c5e4fb" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{A1C3600C-F3E5-300E-8167-541C62083DAA}\InprocServer32" Name="CodeBase" Value="file:///[#IconShellExtension.dll]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="UserAppProject\ShellEx\IconHandler" Value="{a1c3600c-f3e5-300e-8167-541c62083daa}" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Explorer" Name="GlobalAssocChangedCounter" Value="1" Type="integer" Action="write" />
</Component>
<Component Id="SharpShell.dll" Guid="174E147D-4744-492F-BC5C-F00DAA4925AA">
<File Id="SharpShell.dll" KeyPath="yes" Source="$(var.IconShellExtension.TargetDir)\SharpShell.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<ComponentGroup Id="IconShellExtension">
<ComponentRef Id="IconShellExtension.dll" />
<ComponentRef Id="SharpShell.dll" />
</ComponentGroup>
</Fragment>
</Wix>
Goal
I want the installer to be able to install or uninstall without prompting the user about files in use, and it just auto close and restart Windows Explorer during the process. My understanding is that's what the restart manager allows, and the WixUtils RestartResource tag should do this for me.
Any help would be appreciated!
UPDATE
I have tried various different combinations of properties and attempted to remove/disable the FilesInUse dialog.
I tried setting the following combination of properties as suggested in this post:
<Property Id="MSIRMSHUTDOWN" Value="2"/>
<Property Id="MSIDISABLERMRESTART" Value="0"/>
<Property Id="MSIRESTARTMANAGERCONTROL" Value="0"/>
This performed the restart of explorer.exe during uninstall, once the uninstall sequence was completed (although the length of time the explorer was shutdown for was lengthy). However, I found that when I attempt to reinstall, it displayed the FilesInUse dialog again.
I found a solution that worked for me which I will post as the accepted answer.
The best solution that seemed to work and did not display any unwanted dialogs was to remove the MSIRMSHUTDOWN and MSIDISABLERMRESTART properties and set the following property:
<!-- The following setting seems to suppress any restart dialogs -->
<Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable"/>
This cleanly added or removed my shell extension. The only issue is that the shell extension remained active until I rebooted (as this was an Icon Shell Extension only, then this was acceptable to me).

WIX How to add Property in the patch

In the released MSI, I had the hard-coded port number, e.g.
<Property Id="HTTP_PORT1" Secure="yes" Value="1000" />
<Component Id="my.exe" Guid="*" Win64="yes" >
<File Id="my.exe" KeyPath="yes" Source="my.exe" />
<RegistryValue Root="HKLM" Key="SOFTWARE\MyCompany" Name="Port1" Value="[HTTP_PORT1]" Type="integer" />
<RegistryValue Root="HKLM" Key="SOFTWARE\MyCompany" Name="Port2" Value="9000" Type="integer" />
</Component>
And for the patch, my Patch.wxs looked like this:
<PatchFamily Id="Rollup" Version="1.0.100" Supersede="yes">
<ComponentRef Id="my.exe"/>
</PatchFamily>
When I manually change those regs to "1111" and "9999" and applied the patch MSP, those Port1 and Port2 were set back to "1000" and "9000" respectively. So I changed "HTTP_PORT1" and added "INT_HTTP_PORT2" like this:
<Property Id="HTTP_PORT1" Secure="yes" Value="#1000" >
<RegistrySearch Root="HKLM" Key="SOFTWARE\MyCompany" Name="Port1" Type="raw" Win64="yes" />
</Property>
<Property Id="INT_HTTP_PORT2" Secure="yes" Value="#9000" >
<RegistrySearch Root="HKLM" Key="SOFTWARE\MyCompany" Name="Port2" Type="raw" Win64="yes" />
</Property>
<Component Id="my.exe" Guid="*" Win64="yes" >
<File Id="my.exe" KeyPath="yes" Source="my.exe" />
<RegistryValue Root="HKLM" Key="SOFTWARE\MyCompany" Name="Port1" Value="[HTTP_PORT1]" Type="string" />
<RegistryValue Root="HKLM" Key="SOFTWARE\MyCompany" Name="Port2" Value="[INT_HTTP_PORT2]" Type="string" />
</Component>
And I changed Patch.wxs like this:
<PatchFamily Id="Rollup" Version="1.0.100" Supersede="yes">
<ComponentRef Id="my.exe"/>
<PropertyRef Id="HTTP_PORT1"/>
<PropertyRef Id="INT_HTTP_PORT2"/>
</PatchFamily>
However, both Port1 and Port2 are changed back to the original values (although Port1 is now REG_SZ.)
Is this an expected behavior? Is it possible to make it work in the patch without using Type1 custom action?
The executable in that component is the keypath item. I'd verify that you increased the version of that exe because it effectively controls whether that component is updated. You could create a verbose log of the patch install to see exactly what's going on.
What you need to look for in the verbose log is what it says about my.exe, whether it's Overwrite or something else. Also, note that if the component rules were broken in the patch it will effectively result in nothing being patched. You will see SELMGR in the log if that's the case.

Do I need MSIUSEREALADMINDETECTION for this WIX configuration with a COM DLL registration?

I have a WIX installation setup for a COM DLL that seems to work fine without the MSIUSEREALADMINDETECTION value set to 1. However, I am not sure if it works on all configurations (Windows versions, .NET versions, etc).
Would you include ("Property Id="MSIUSEREALADMINDETECTION" Value="1") in my WIX configuration file just to be 100% sure that the MSI will register the COM DLL correctly in all corner cases?
As I have understood, this property will force the installer to run with "real" administrative rights.
This is for an enterprise application so it is very important the installation goes smooth.
WIX file:
<?xml version="1.0" encoding="UTF-8"?>
<!-- <Property Id="MSIUSEREALADMINDETECTION" Value="1" /> unsure if this is needed yet -->
<Property Id="ARPHELPLINK" Value="http://www.example.com" />
<Property Id="ARPURLINFOABOUT" Value="http://www.example.com" />
<PropertyRef Id="NETFRAMEWORK40FULL" />
<PropertyRef Id="NETFRAMEWORK40CLIENT" />
<Condition Message="This application requires .NET Framework 4.0 or later. Please install the .NET Framework 4.0 or later and then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK40CLIENT]]>
</Condition>
<WixVariable Id="WixUIDialogBmp" Value="InstallerBackgroundWix.bmp" />
<WixVariable Id="WixUIBannerBmp" Value="InstallerBannerWix.bmp" />
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="example">
<Component Id="MyAddin" Guid="guid3" Win64="no">
<File Id="exampleDLL" Source="$(var.example.TargetDir)example.dll"/>
<Class Id="{guid4}" Context="InprocServer32" Description="example" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="example" Description="example" />
</Class>
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="Class" Value="example.Addin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="Assembly" Value="example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32\1.0.0.0" Name="CodeBase" Value="file:///[#exampleDLL]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="Class" Value="example.Addin" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="Assembly" Value="example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{guid4}\InprocServer32" Name="CodeBase" Value="file:///[#exampleDLL]" Type="string" Action="write" />
<RegistryKey Root="HKLM" Key="SOFTWARE\Microsoft\Office\Outlook\Addins\example">
<RegistryValue Type="integer" Name="LoadBehavior" Value="3"/>
<RegistryValue Type="string" Name="Description" Value="example Outlook Add-in"/>
<RegistryValue Type="string" Name="FriendlyName" Value="example Outlook Add-in"/>
</RegistryKey>
</Component>
</Directory>
</Directory>
</Directory>
</Fragment>
No, don't use it. It does not give the install any more privilege to do anything. It's a legacy setting that enables older MSI installs to get values for the Privileged and AdminUser values as they were before UAC. In other words if you ask the value of the AdminUser property in the UI sequence (before the UAC prompt) it will tell you "true" if MSIUSEREALADMINDETECTION is set and "false" if it isn't (which is considered the right answer because there's been no elevation prompt so how can the user be Admin?).
Better answer at Mark MSI so it has to be run as elevated Administrator account
Summary: One difference is it changes the user credentials that CustomActions are run under.

Cannot create registry key value with WiX installer

The below component does everything as expected, but fails to write the last registry key value. I get no errors.
<Component Id="ProgramMenuDir" Guid="68977683-3F36-45EF-9FF4-7B9461A42D06">
<RemoveFolder Id="ProgramMenuDir" On="uninstall" />
<RegistryKey Root="HKLM" Key="Software\Wow6432Node\[Manufacturer]\[ProductName]" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Name="APIUrl" Value="http://api.blah/" KeyPath="yes" />
<RegistryValue Type="string" Name="Token" Value="blah" />
</RegistryKey>
<RegistryKey Root="HKLM" Key="Software\Wow6432Node\[Manufacturer]\[ProductName]\Tokens" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" />
<RegistryKey Root="HKLM" Key="Software\Wow6432Node\[Manufacturer]\[ProductName]\Tokens\WOvN+Lac+d3wRtY0uBUsAeHTYg4x7j2/NWpftWv/16qaOz3J6TpDQmvjUpQmoCWPSFdMpbrcpi4rJd56aBKkkvSR54RsS5xueaYfPgk1QmQ=" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" />
<RegistryValue Root="HKLM" Action="write" Key="Software\Microsoft\Windows\CurrentVersion\Run" Name="[ProductName]" Value="blah" Type="string" />
</Component>
Why no write, yet no errors?
Are you just looking in the wrong place, if this is a 32 bit installer then you need to check the following location - HKLM\Software\Wow6432Node\Microsoft
Remember that these are the equivalent nodes depending on your install architecture:
32bit installer on 64bit machine:
HKLM\Software\Wow6432Node\Microsoft
32bit installer on 32bit machine or 64bit installer on 64bit machine:
HKLM\Software\Microsoft

How can I set an icon for an asscociated file using WiX?

My application install file is being generated using WiX. In the WiX configuration I am associating a file type that works with the application. How can I associate an icon with this file type in the WiX configuration?
FROM: https://www.firegiant.com/wix/tutorial/getting-started/beyond-files/
If your application handles its own file data type, you will need to register a file association for it. Put a ProgId inside your component. FileId should refer to the Id attribute of the File element describing the file meant to handle the files of this extension. Note the exclamation mark: it will return the short path of the file instead of the long one:
<ProgId Id='AcmeFoobar.xyzfile' Description='Acme Foobar data file'>
<Extension Id='xyz' ContentType='application/xyz'>
<Verb Id='open' Sequence='10' Command='Open' Target='[!FileId]' Argument='"%1"' />
</Extension>
</ProgId>
To assign an icon to this file type, you have to specify the appropriate registry entries yourself inside your component:
<Registry Id='FooIcon1' Root='HKCR' Key='.xyz' Action='write'
Type='string' Value='AcmeFoobar.xyzfile' />
<Registry Id='FooIcon2' Root='HKCR' Key='AcmeFoobar.xyzfile' Action='write'
Type='string' Value='Acme Foobar data file' />
<Registry Id='FooIcon3' Root='HKCR' Key='AcmeFoobar.xyzfile\DefaultIcon' Action='write'
Type='string' Value='[INSTALLDIR]Foobar.exe,1' />
This is how I did it. I declared:
<Icon Id="Icon.exe" SourceFile="..\Installer\Graph.ico" />
before </Product> and added it as a reference as follows:
<ProgId Id='myApp.exe' Description='Some description' Advertise='yes' Icon='Icon.exe'>
<Extension Id='xyz' ContentType='application/text'>
<Verb Id='open' Sequence='10' Command='Open' Argument='"%1"' />
</Extension>
</ProgId>
I'd recommend following my stack overflow post located here for the simplest and most elegant way of embedding icons into a resource without the need for a c++ project in a managed .NET application.
Next, here is the proper way to set this via wix:
<Component Id="stackoverflowFileRegistration" Guid="MY_GUID">
<RegistryKey Root="HKCR" Key=".stackoverflow" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Value="stackoverflow.Document" Type="string" KeyPath="yes" />
<RegistryValue Name="Content Type" Value="application/stackoverflow" Type="string" />
<RegistryKey Key="ShellNew" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Name="NullFile" Value="" Type="string" />
<RegistryValue Name="Data" Value="Default new document Content.. NOTE: you must use a MutiStringValue nodes for multi-line content...." Type="string"/>
</RegistryKey>
</RegistryKey>
<RegistryKey Root="HKCR" Key="stackoverflow.Document" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Value="stackoverflow Document" Type="string" />
<RegistryKey Key="DefaultIcon" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Value="[INSTALLDIR]bin\stackoverflow.lib.dll, 1" Type="string" />
</RegistryKey>
<RegistryKey Key="Shell" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryKey Key="openstackoverflowwebsite" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Value="Open Stackoverflow" Type="string" />
<RegistryKey Key="command" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Value=""[INSTALLDIR]stackoverflow.exe" /openwebsite "%1"" Type="string" />
</RegistryKey>
</RegistryKey>
</RegistryKey>
</RegistryKey>
</Component>
This sample registers the default icon for a specific file extension (.stackoverflow) that is located in an assembly from step 1. It also shows how to create Windows Explorer associated right click commands as well as adds a menu item to the Windows Explorer New sub menu.
Thanks
-Blake Niemyjski
Please note that Dracos answer is not suffiecent for a complete icon/file association.
The following code:
This is how I did it. I declared:
<Icon Id="Icon.exe" SourceFile="..\Installer\Graph.ico" />
<ProgId Id='myApp.exe' Description='Some description' Advertise='yes' Icon='Icon.exe'>
<Extension Id='xyz' ContentType='application/text'>
<Verb Id='open' Sequence='10' Command='Open' Argument='"%1"' />
</Extension>
</ProgId>
Is only registering a file/icon association for the dialouges created by the application which is installed by the given wix-project.
To get an icon that is shown overall for all the dialogues, desktop etc. in windows you also need to register your icon for a specific filetype (extension) in regedit.