mirror of
https://gitlab.com/niansa/PolicyToolLib.git
synced 2025-03-06 20:48:27 +01:00
Fixed build issue
This commit is contained in:
parent
937417b6f8
commit
91f545fa00
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,7 @@ class LibInherit : public ModuleBase {
|
|||
_In_ BOOL bInheritHandles, _In_ DWORD dwCreationFlags, _In_opt_ LPVOID lpEnvironment,
|
||||
_In_opt_ LPCSTR lpCurrentDirectory, _In_ LPSTARTUPINFOA lpStartupInfo, _Out_ LPPROCESS_INFORMATION lpProcessInformation
|
||||
) {
|
||||
char buffer[16];
|
||||
if (GetEnvironmentVariable("__POLICYTOOL_ADMINIMPERSONATE", buffer, sizeof(buffer)) && buffer[0] == '1') {
|
||||
SetEnvironmentVariableW(L"__COMPAT_LAYER", L"RunAsInvoker");
|
||||
}
|
||||
|
@ -30,6 +31,7 @@ class LibInherit : public ModuleBase {
|
|||
_In_ BOOL bInheritHandles, _In_ DWORD dwCreationFlags, _In_opt_ LPVOID lpEnvironment,
|
||||
_In_opt_ LPCWSTR lpCurrentDirectory, _In_ LPSTARTUPINFOW lpStartupInfo, _Out_ LPPROCESS_INFORMATION lpProcessInformation
|
||||
) {
|
||||
char buffer[16];
|
||||
if (GetEnvironmentVariable("__POLICYTOOL_ADMINIMPERSONATE", buffer, sizeof(buffer)) && buffer[0] == '1') {
|
||||
SetEnvironmentVariableW(L"__COMPAT_LAYER", L"RunAsInvoker");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue