mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
fix: preserve preset __COMPAT_LAYER
This commit is contained in:
parent
43861e9206
commit
cff1519780
1 changed files with 10 additions and 1 deletions
|
|
@ -74,10 +74,19 @@ namespace Dalamud.Injector
|
|||
};
|
||||
|
||||
var compatLayerPrev = Environment.GetEnvironmentVariable("__COMPAT_LAYER");
|
||||
if (compatLayerPrev != null && !compatLayerPrev.Contains("RunAsInvoker"))
|
||||
{
|
||||
Environment.SetEnvironmentVariable("__COMPAT_LAYER", $"RunAsInvoker {compatLayerPrev}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Environment.SetEnvironmentVariable("__COMPAT_LAYER", "RunAsInvoker");
|
||||
}
|
||||
|
||||
Environment.SetEnvironmentVariable("__COMPAT_LAYER", "RunAsInvoker");
|
||||
try
|
||||
{
|
||||
Log.Information("Starting with __COMPAT_LAYER={CompatLayer}", Environment.GetEnvironmentVariable("__COMPAT_LAYER"));
|
||||
|
||||
if (!PInvoke.CreateProcess(
|
||||
null,
|
||||
$"\"{exePath}\" {arguments}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue