Header menu logo fable-electron-docs-api

Settings Type

Constructors

Constructor Description

Settings(?openAtLogin, ?openAsHidden, ?type, ?serviceName, ?path, ?args, ?enabled, ?name)

Full Usage: Settings(?openAtLogin, ?openAsHidden, ?type, ?serviceName, ?path, ?args, ?enabled, ?name)

Parameters:
    ?openAtLogin : bool - true to open the app at login, false to remove the app as a login item. Defaults to false.
    ?openAsHidden : bool - ⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || true to open the app as hidden. Defaults to false. The user can edit this setting from the System Preferences so app.getLoginItemSettings().wasOpenedAsHidden should be checked when the app is opened to know the current value. This setting is not available on MAS builds or on macOS 13 and up.
    ?type : Type - ⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || The type of service to add as a login item. Defaults to mainAppService. Only available on macOS 13 and up.
    ?serviceName : string - ⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || The name of the service. Required if type is non-default. Only available on macOS 13 and up.
    ?path : string - ⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || The executable to launch at login. Defaults to process.execPath.
    ?args : string[] - ⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || The command-line arguments to pass to the executable. Defaults to an empty array. Take care to wrap paths in quotes.
    ?enabled : bool - ⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || true will change the startup approved registry key and enable / disable the App in Task Manager and Windows Settings. Defaults to true.
    ?name : string - ⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || value name to write into registry. Defaults to the app's AppUserModelId().

Returns: Settings
?openAtLogin : bool

true to open the app at login, false to remove the app as a login item. Defaults to false.

?openAsHidden : bool

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || true to open the app as hidden. Defaults to false. The user can edit this setting from the System Preferences so app.getLoginItemSettings().wasOpenedAsHidden should be checked when the app is opened to know the current value. This setting is not available on MAS builds or on macOS 13 and up.

?type : Type

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || The type of service to add as a login item. Defaults to mainAppService. Only available on macOS 13 and up.

?serviceName : string

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || The name of the service. Required if type is non-default. Only available on macOS 13 and up.

?path : string

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || The executable to launch at login. Defaults to process.execPath.

?args : string[]

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || The command-line arguments to pass to the executable. Defaults to an empty array. Take care to wrap paths in quotes.

?enabled : bool

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || true will change the startup approved registry key and enable / disable the App in Task Manager and Windows Settings. Defaults to true.

?name : string

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || value name to write into registry. Defaults to the app's AppUserModelId().

Returns: Settings

Instance members

Instance member Description

this.args

Full Usage: this.args

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ The command-line arguments to pass to the executable. Defaults to an empty array. Take care to wrap paths in quotes.

this.enabled

Full Usage: this.enabled

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌true will change the startup approved registry key and enable / disable the App in Task Manager and Windows Settings. Defaults to true.

this.name

Full Usage: this.name

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ value name to write into registry. Defaults to the app's AppUserModelId().

this.openAtLogin

Full Usage: this.openAtLogin

true to open the app at login, false to remove the app as a login item. Defaults to false.

this.path

Full Usage: this.path

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ The executable to launch at login. Defaults to process.execPath.

this.serviceName

Full Usage: this.serviceName

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ The name of the service. Required if type is non-default. Only available on macOS 13 and up.

this.type

Full Usage: this.type

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ The type of service to add as a login item. Defaults to mainAppService. Only available on macOS 13 and up.

Type something to start searching.