Browse Source

启动前先卸载

xljiulang 4 years ago
parent
commit
5093e8974b
1 changed files with 1 additions and 0 deletions
  1. 1 0
      FastGithub.DnscryptProxy/DnscryptProxyService.cs

+ 1 - 0
FastGithub.DnscryptProxy/DnscryptProxyService.cs

@@ -52,6 +52,7 @@ namespace FastGithub.DnscryptProxy
 
             if (OperatingSystem.IsWindows())
             {
+                StartDnscryptProxy("-service uninstall")?.WaitForExit();
                 StartDnscryptProxy("-service install")?.WaitForExit();
                 StartDnscryptProxy("-service start")?.WaitForExit();
                 this.Process = Process.GetProcessesByName(name).FirstOrDefault(item => item.SessionId == 0);