From 8b6088d4a19953b1f2fb5de36564acf62e8e7093 Mon Sep 17 00:00:00 2001 From: ahmadali shafiee Date: Mon, 2 Nov 2020 11:38:42 +0330 Subject: [PATCH] create proper key if different key exists on registry Signed-off-by: ahmadali shafiee --- shadowsocks-csharp/Controller/System/AutoStartup.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shadowsocks-csharp/Controller/System/AutoStartup.cs b/shadowsocks-csharp/Controller/System/AutoStartup.cs index 557b8a3f..853e7a36 100644 --- a/shadowsocks-csharp/Controller/System/AutoStartup.cs +++ b/shadowsocks-csharp/Controller/System/AutoStartup.cs @@ -84,6 +84,8 @@ namespace Shadowsocks.Controller if (string.Equals(runKey.GetValue(valueName).ToString(), Program.ExecutablePath, StringComparison.InvariantCultureIgnoreCase)) { runKey.DeleteValue(valueName); + runKey.SetValue(Key, Program.ExecutablePath); + check = true; } } return check;