From 3275454bd6d3f0309f1bb670a2bc22ca9c7862ef Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Fri, 12 Aug 2022 20:24:15 +0800 Subject: [PATCH] clear auto run --- v2rayN/v2rayN/Tool/Utils.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v2rayN/v2rayN/Tool/Utils.cs b/v2rayN/v2rayN/Tool/Utils.cs index 1195e086..39be59a0 100644 --- a/v2rayN/v2rayN/Tool/Utils.cs +++ b/v2rayN/v2rayN/Tool/Utils.cs @@ -594,6 +594,12 @@ namespace v2rayN { try { + //clear + if (!RegReadValue(autoRunRegPath, "v2rayNAutoRun", "").IsNullOrEmpty()) + { + RegWriteValue(autoRunRegPath, "v2rayNAutoRun", ""); + } + string value = RegReadValue(autoRunRegPath, autoRunName, ""); string exePath = GetExePath(); if (value?.Equals(exePath) == true || value?.Equals($"\"{exePath}\"") == true)