Browse Source

Fix autorun

pull/1754/head
Yurun 3 years ago
parent
commit
c85e418afa
  1. 4
      v2rayN/v2rayN/Tool/Utils.cs

4
v2rayN/v2rayN/Tool/Utils.cs

@ -536,7 +536,7 @@ namespace v2rayN
try
{
string exePath = GetExePath();
RegWriteValue(autoRunRegPath, autoRunName, run ? exePath : "");
RegWriteValue(autoRunRegPath, autoRunName, run ? ("\"" + exePath + "\"") : "");
}
catch
{
@ -553,7 +553,7 @@ namespace v2rayN
{
string value = RegReadValue(autoRunRegPath, autoRunName, "");
string exePath = GetExePath();
if (value?.Equals(exePath) == true)
if (value?.Equals(exePath) == true || value?.Equals("\"" + exePath + "\"") == true)
{
return true;
}

Loading…
Cancel
Save