瀏覽代碼

启动前先卸载

xljiulang 4 年之前
父節點
當前提交
5093e8974b
共有 1 個文件被更改,包括 1 次插入0 次删除
  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);