Skip to content

Commit 1073061

Browse files
committed
Remove old before creating new one
1 parent c5c24ac commit 1073061

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Flow.Launcher/Helper/AutoStartup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,14 @@ public static void DisableViaLogonTaskAndRegistry()
126126
public static void ChangeToViaLogonTask(bool alwaysRunAsAdministrator)
127127
{
128128
Disable(false);
129+
Disable(true); // Remove old logon task so that we can create a new one
129130
Enable(true, alwaysRunAsAdministrator);
130131
}
131132

132133
public static void ChangeToViaRegistry()
133134
{
134135
Disable(true);
136+
Disable(false); // Remove old registry so that we can create a new one
135137
// We do not need to use alwaysRunAsAdministrator for registry, so we just set false here
136138
Enable(false, false);
137139
}

0 commit comments

Comments
 (0)