Fix auto-start path with DLL name

This commit is contained in:
2023-04-28 07:53:38 -04:00
parent 519f527f96
commit 1b95ec253b

View File

@@ -1,6 +1,6 @@
using System;
using Microsoft.Win32;
using System;
using System.Reflection;
using Microsoft.Win32;
namespace ChrisKaczor.Wpf.Application
{
@@ -15,7 +15,7 @@ namespace ChrisKaczor.Wpf.Application
public static void SetStartWithWindows(this System.Windows.Application application, string applicationName, bool value)
{
var applicationPath = $"\"{Assembly.GetEntryAssembly()!.Location}\"";
var applicationPath = $"\"{Environment.ProcessPath}\"";
SetStartWithWindows(application, applicationName, applicationPath, value);
}