Electron 24 has added a flag logUsage to shell.openExternal() but is not very clear to me, when it should be (or should not be) used?
From Electron.js 24 Release Notes:
Added
logUsagetoshell.openExternal()options, which allows passing theSEE_MASK_FLAG_LOG_USAGEflag toShellExecuteExon Windows. TheSEE_MASK_FLAG_LOG_USAGEflag indicates a user initiated launch that enables tracking of frequently used programs and other behaviors.
All actions are directly or indirectly user initiated in a typical app. So, it seems to me, the flag should be logUsage: true always. The question is, when to set the flag to false? E.g. these use cases when shell.openExternal() may be executed:
- User action to open URL from her data (content) - it clear that
logUsage: true. - User action to open internal app help. The app author decides that the help is in external files and also decides format of these files (PDF, HTML, ...). So, the action is user initiated, but it's a kind of internal app stuff. Should be
logUsage: falsein this case? - Other app action examples where should be
logUsage: false?
(Windows SHELLEXECUTEINFOA structure documentation is not much helpful neither.)