837183 writes

Here’s a use case that’s actually real:

I want to teach my co-workers to work with Recoll, and have them not deal with installation and configuration.

That includes defining the mimeview for them.

For EML files, I think using what they already have on their PCs are good enough: Outlook 2007 or Outlook 2013.

The default path for 2007 is different than that of 2013, if a fallback order was in place, mimeview could be defined like this:

#!python

[view]

message/rfc822 = pathToOutlook2007.exe /eml %f

message/rfc822 = pathToOutlook2013.exe /eml %f

if executing pathToOutlook2007.exe fails - move to pathToOutlook2013.exe

At the moment, pathToOutlook2013.exe will be executed (always the last one to be read)

medoc writes

This makes a lot of sense, but it is also impossible because of the way the configuration files are currently implemented. On Linux, this would easily be solved by using an intermediary script which would be the one listed in mimeview, and would test and decide what program to execute. I guess that the same thing might be feasible on windows ?

837183 writes

How will it be decided? by the exit code?.. if so, yeah, that’d work..

medoc writes

In a bash Linux script, I’d just test for the presence of either outlook 2007 or 2013 (or whatever else could be used), and execute the right one. I guess that the same thing could be done on Windows, but I’m just guessing here, as I don’t know anything about Windows scripting.

837183 writes

doable with batch..

if exist "C:\A\B.exe"

(

<execute this >

<exit >

)

if

if exist "C:\A\C.exe"

(

<execute this >

<exit >

)

I could try to see if batch is good enough…

medoc writes

Should be solvable by Windows scripting, and nothing more I can do here.