diff --git a/IPA.Loader/Logging/ConsoleWindow.cs b/IPA.Loader/Logging/ConsoleWindow.cs index 2b6fd020..5dbc7462 100644 --- a/IPA.Loader/Logging/ConsoleWindow.cs +++ b/IPA.Loader/Logging/ConsoleWindow.cs @@ -24,10 +24,8 @@ namespace IPA.Logging public static void Initialize(int processId, bool alwaysCreateNewConsole = false) { - bool consoleAttached = true; - if (alwaysCreateNewConsole - || (!AttachConsole(processId) - && Marshal.GetLastWin32Error() != ErrorAccessDenied)) + bool consoleAttached; + if (alwaysCreateNewConsole || !(consoleAttached = AttachConsole(processId))) { consoleAttached = AllocConsole(); } diff --git a/docs/articles/command-line.md b/docs/articles/command-line.md index be94ab21..019e50cc 100644 --- a/docs/articles/command-line.md +++ b/docs/articles/command-line.md @@ -40,6 +40,9 @@ Here's a quick list of what they are and what they do. > ```powershell > powershell -c ".\steam -applaunch 620980 --verbose (Get-CimInstance Win32_Process -Filter ProcessId=$PID).ParentProcessId" > ``` + > + > Do note that this isn't going to work from an elevated terminal. + - `--debug`