We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent baf02e9 commit 46993acCopy full SHA for 46993ac
src/libs/dutil/WixToolset.DUtil/procutil.cpp
@@ -44,6 +44,14 @@ extern "C" HRESULT DAPI ProcElevated(
44
HANDLE hToken = NULL;
45
TOKEN_ELEVATION tokenElevated = { };
46
DWORD cbToken = 0;
47
+ BOOL bPrivileged = FALSE;
48
+
49
+ if (OsCouldRunPrivileged(&bPrivileged) != S_OK ||
50
+ !bPrivileged)
51
+ {
52
+ *pfElevated = FALSE;
53
+ ExitFunction1(hr = S_OK);
54
+ }
55
56
if (!::OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
57
{
0 commit comments