From e46ba65665610f2544414618b8a0de00c03e7903 Mon Sep 17 00:00:00 2001 From: Dustin Howett Date: Mon, 21 Sep 2020 11:02:44 -0700 Subject: [PATCH] Revert "Fix environment block creation (#7401)" This reverts commit 7886f16714a734fe1a122b9f22986d283d0f0a41. --- src/types/Environment.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/types/Environment.cpp b/src/types/Environment.cpp index 962297ace2c..010f6c8f8f8 100644 --- a/src/types/Environment.cpp +++ b/src/types/Environment.cpp @@ -3,7 +3,6 @@ #include "precomp.h" #include "inc/Environment.hpp" -#include "wil/token_helpers.h" using namespace ::Microsoft::Console::Utils; @@ -15,8 +14,7 @@ using namespace ::Microsoft::Console::Utils; EnvironmentBlockPtr Microsoft::Console::Utils::CreateEnvironmentBlock() { void* newEnvironmentBlock{ nullptr }; - auto processToken{ wil::open_current_access_token(TOKEN_QUERY | TOKEN_DUPLICATE) }; - if (!::CreateEnvironmentBlock(&newEnvironmentBlock, processToken.get(), FALSE)) + if (!::CreateEnvironmentBlock(&newEnvironmentBlock, GetCurrentProcessToken(), FALSE)) { return nullptr; }