explorer: add /startfile switch for starting files from file managers

Vincent Povirk madewokherd+d41d at gmail.com
Sun Mar 16 23:39:01 CDT 2008

This patch adds a switch, /startfile, to explorer.exe, used as "wine
explorer /startfile filename". It accepts a windows or unix path. It
attempts to mimic what windows explorer does to start files and
provide some visible (gui) feedback when it doesn't work. The idea is
that wine.desktop can then be modified to use this switch instead of
wine, solving the following problems when starting exe files from file
* File managers typically do not set the working directory to the
directory that contains an exe when they start it. Setting the working
directory is the default behavior for windows explorer, and many
windows programs rely on it.
* File managers naturally use the unix path to start files, and the
wine binary passes the unix path along to the exe it starts, rather
than translating it to a windows path (this can and probably should
also be fixed somewhere else).
* Windows explorer always starts exe files with quotes around the path
in the command-line, even if the path does not contain spaces. The
wine binary does not (and probably should not) add quotes in this
situation. A few apps rely on the quotes. See

My last attempt created a new winelib program; apparently this
functionality fits in explorer.

Vincent Povirk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-explorer-add-startfile-switch-for-starting-files-f.patch
Type: text/x-patch
Size: 13559 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20080317/a0aac1b6/attachment.bin 

More information about the wine-devel mailing list