mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
feat: disable old windows auto launch
This commit is contained in:
parent
4bd2174bf3
commit
ed978af3ae
@ -11,6 +11,10 @@ const autoLaunch = async (
|
|||||||
) => {
|
) => {
|
||||||
if (!app.isPackaged) return;
|
if (!app.isPackaged) return;
|
||||||
|
|
||||||
|
const appLauncher = new AutoLaunch({
|
||||||
|
name: app.getName(),
|
||||||
|
});
|
||||||
|
|
||||||
if (process.platform == "win32") {
|
if (process.platform == "win32") {
|
||||||
const destination = path.join(windowsStartupPath, "hydralauncher.vbs");
|
const destination = path.join(windowsStartupPath, "hydralauncher.vbs");
|
||||||
|
|
||||||
@ -19,12 +23,10 @@ const autoLaunch = async (
|
|||||||
|
|
||||||
fs.copyFileSync(scriptPath, destination);
|
fs.copyFileSync(scriptPath, destination);
|
||||||
} else {
|
} else {
|
||||||
|
appLauncher.disable().catch();
|
||||||
fs.rmSync(destination);
|
fs.rmSync(destination);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const appLauncher = new AutoLaunch({
|
|
||||||
name: app.getName(),
|
|
||||||
});
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
appLauncher.enable().catch();
|
appLauncher.enable().catch();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user