From 14dfcac19adeb594c65a4105e8b59dd29a016b62 Mon Sep 17 00:00:00 2001 From: awaescher Date: Mon, 17 Jul 2023 17:21:07 +0200 Subject: [PATCH] Fix autostart with self contained exe --- StageManager/AutoStart.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StageManager/AutoStart.cs b/StageManager/AutoStart.cs index 9c601cb..39c4ba1 100644 --- a/StageManager/AutoStart.cs +++ b/StageManager/AutoStart.cs @@ -24,6 +24,6 @@ public static void SetStartup(string appName, bool startup) private static string GetValueAsString(RegistryKey key, string appName) => key.GetValue(appName)?.ToString() ?? ""; - private static string GetAppPath() => $"\"{Assembly.GetEntryAssembly().Location}\""; + private static string GetAppPath() => $@"""{Environment.ProcessPath}"""; } }