From 54699edefbf79b2e7e1311debddc8d41beeb53b1 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Fri, 15 May 2020 02:14:21 +0800 Subject: [PATCH] fix startup #2928 https://github.com/Wox-launcher/Wox/issues/2928 --- Wox.Infrastructure/Constant.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Wox.Infrastructure/Constant.cs b/Wox.Infrastructure/Constant.cs index 3833541c8..eb1ab3e9b 100644 --- a/Wox.Infrastructure/Constant.cs +++ b/Wox.Infrastructure/Constant.cs @@ -9,10 +9,11 @@ namespace Wox.Infrastructure public static class Constant { public const string Wox = "Wox"; + public static readonly string WoxExecutable = $"{Wox}.exe"; public const string Plugins = "Plugins"; private static Assembly Assembly = Assembly.GetExecutingAssembly(); - public static string ExecutablePath = Assembly.Location.NonNull(); + public static string ExecutablePath = Path.Combine(Path.GetDirectoryName(Assembly.Location), WoxExecutable); public static string Version = FileVersionInfo.GetVersionInfo(ExecutablePath).ProductVersion; public static string ProgramDirectory = Directory.GetParent(ExecutablePath).ToString();