xmedeko
xmedeko

Reputation: 7820

How to use logUsage flag to shell.openExternal() in Electron?

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 logUsage to shell.openExternal() options, which allows passing the SEE_MASK_FLAG_LOG_USAGE flag to ShellExecuteEx on Windows. The SEE_MASK_FLAG_LOG_USAGE flag 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:

(Windows SHELLEXECUTEINFOA structure documentation is not much helpful neither.)

Upvotes: 1

Views: 42

Answers (0)

Related Questions