16 lines
434 B
C#
16 lines
434 B
C#
using Pilz.Runtime;
|
|
using System.Diagnostics;
|
|
|
|
namespace Pilz.Win32;
|
|
|
|
public static class NativeTools
|
|
{
|
|
[Obsolete("Use \"Environment.ProcessPath\" instead.")]
|
|
public static string GetExecutablePath(bool checkRealOS = false)
|
|
{
|
|
if (RuntimeInformationsEx.IsOSPlatform(OSType.Windows, checkRealOS))
|
|
return Environment.ProcessPath;
|
|
return Process.GetCurrentProcess().MainModule.FileName;
|
|
}
|
|
}
|