mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-23 16:27:44 +01:00
chore: log all CreateProcess args, environment
This commit is contained in:
parent
12b9ac4307
commit
45fd104e42
1 changed files with 13 additions and 2 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
|
|
@ -87,11 +89,20 @@ namespace Dalamud.Injector
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.Information("Starting with __COMPAT_LAYER={CompatLayer}", Environment.GetEnvironmentVariable("__COMPAT_LAYER"));
|
var commandLine = $"\"{exePath}\" {arguments}";
|
||||||
|
Log.Information("Starting with:");
|
||||||
|
Log.Information("lpCommandLine: {CommandLine}", commandLine);
|
||||||
|
Log.Information("lpCurrentDirectory: {CurrentDirectory}", workingDir);
|
||||||
|
|
||||||
|
Log.Information("Environment:");
|
||||||
|
foreach (var envVar in Environment.GetEnvironmentVariables().Cast<DictionaryEntry>())
|
||||||
|
{
|
||||||
|
Log.Information("\t{Key}={Value}", envVar.Key, envVar.Value);
|
||||||
|
}
|
||||||
|
|
||||||
if (!PInvoke.CreateProcess(
|
if (!PInvoke.CreateProcess(
|
||||||
null,
|
null,
|
||||||
$"\"{exePath}\" {arguments}",
|
commandLine,
|
||||||
ref lpProcessAttributes,
|
ref lpProcessAttributes,
|
||||||
IntPtr.Zero,
|
IntPtr.Zero,
|
||||||
false,
|
false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue