shell32: Make ShellExecute use native file association databases as fallback path

Francois Gouget fgouget at
Sat Jun 2 04:11:54 CDT 2012

On Thu, 31 May 2012, Erik van Pienbroek wrote:
> Tested successfully on a Fedora 17 environment using the start.exe
> command and Outlook 2007 by trying to open a .pdf file (where there
> is no file association registered inside the wine prefix)

There are two issues with this patch:
 * In some cases xdg-open returns 0 whether or not there is a native 
   file association. This is the case in KDE for instance. That would 
   cause ShellExecute() to be unable to return anything but success.

 * There is a risk of infinite loops if the native association calls 
   Wine. One such scenario is if you create the native association using 
   Wine but later wipe out the Wine prefix so that there is no handler 
   on the Wine side anymore. However I believe it can also happen simply 
   because Windows' associations are based on extensions and Unix's on 
   MIME types so that neither thinks they handle that case.

Francois Gouget <fgouget at>

More information about the wine-devel mailing list