From 2615b72cee86f4603bbd102798f070bdab1f01df Mon Sep 17 00:00:00 2001 From: Mozi <29089388+pzhlkj6612@users.noreply.github.com> Date: Sat, 6 Jun 2020 12:09:04 +0800 Subject: [PATCH] Run `v2rayUpgrade.exe` in the same folder as `v2rayN.exe` --- v2rayN/v2rayN/Forms/MainForm.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index bf61cc5b..3ca10813 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -1298,7 +1298,16 @@ namespace v2rayN.Forms try { string fileName = Utils.GetPath(downloadHandle.DownloadFileName); - Process process = Process.Start("v2rayUpgrade.exe", "\"" + fileName + "\""); + Process process = new Process + { + StartInfo = new ProcessStartInfo + { + FileName = "v2rayUpgrade.exe", + Arguments = "\"" + fileName + "\"", + WorkingDirectory = Utils.StartupPath() + } + }; + process.Start(); if (process.Id > 0) { menuExit_Click(null, null);