Skip to content

Commit d1b2608

Browse files
committed
Revert "Fix environment block creation (#7401)"
This reverts commit 7886f16. (cherry picked from commit e46ba65)
1 parent da26894 commit d1b2608

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/types/Environment.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "precomp.h"
55
#include "inc/Environment.hpp"
6-
#include "wil/token_helpers.h"
76

87
using namespace ::Microsoft::Console::Utils;
98

@@ -15,8 +14,7 @@ using namespace ::Microsoft::Console::Utils;
1514
EnvironmentBlockPtr Microsoft::Console::Utils::CreateEnvironmentBlock()
1615
{
1716
void* newEnvironmentBlock{ nullptr };
18-
auto processToken{ wil::open_current_access_token(TOKEN_QUERY | TOKEN_DUPLICATE) };
19-
if (!::CreateEnvironmentBlock(&newEnvironmentBlock, processToken.get(), FALSE))
17+
if (!::CreateEnvironmentBlock(&newEnvironmentBlock, GetCurrentProcessToken(), FALSE))
2018
{
2119
return nullptr;
2220
}

0 commit comments

Comments
 (0)