3.0.0 • Published 3 years ago
@kydronepilot/electron-winstore-auto-launch v3.0.0
@kydronepilot/electron-winstore-auto-launch
This is a fork of electron-winstore-auto-launch
by Felix Rieseberg. It has the
modifications:
- All functions except
getStartupTask
have been eliminated to simplify things. - The task name must be passed to
getStartupTask
, to make sure the library is getting the right task. - Updated to the Fall Creators Update (Redstone 3) Windows SDK.
Example usage
import { WindowsStoreAutoLaunch, StartupTaskState } from 'electron-winstore-auto-launch';
async function configureStartOnLogin(shouldStart: boolean) {
// Returns the task specified if it exists, else undefined
const task = await WindowsStoreAutoLaunch.getStartupTask('taskID')
if (task !== undefined) {
if (task.state !== StartupTaskState.disabledByUser) {
if (task.state === StartupTaskState.disabled && shouldStart) {
task.requestEnableAsync((error, result) => {
if (error)
throw new Error()
})
} else if (task.state === StartupTaskState.enabled && !shouldStart) {
task.disable()
}
}
}
}
For more info, visit the original repository by Felix Rieseberg.
License
MIT, please see LICENSE
for details.
3.0.0
3 years ago
3.0.0-beta7
3 years ago
3.0.0-beta6
3 years ago
3.0.0-beta5
3 years ago
3.0.0-beta4
3 years ago
3.0.0-beta3
3 years ago
3.0.0-beta2
3 years ago
3.0.0-beta1
3 years ago