From 1073061bda93cbe9682cc8a63e0910dcf8992498 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 22 May 2025 22:55:29 +0800 Subject: [PATCH] Remove old before creating new one --- Flow.Launcher/Helper/AutoStartup.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Flow.Launcher/Helper/AutoStartup.cs b/Flow.Launcher/Helper/AutoStartup.cs index 6e1702ccf..7a1a180b4 100644 --- a/Flow.Launcher/Helper/AutoStartup.cs +++ b/Flow.Launcher/Helper/AutoStartup.cs @@ -126,12 +126,14 @@ public class AutoStartup public static void ChangeToViaLogonTask(bool alwaysRunAsAdministrator) { Disable(false); + Disable(true); // Remove old logon task so that we can create a new one Enable(true, alwaysRunAsAdministrator); } public static void ChangeToViaRegistry() { Disable(true); + Disable(false); // Remove old registry so that we can create a new one // We do not need to use alwaysRunAsAdministrator for registry, so we just set false here Enable(false, false); }