diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-07 18:54:54 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-02-07 18:59:06 -0600 |
commit | 096784ea5114cb5bf99151cc047d69951035d152 (patch) | |
tree | 28adaf67c91518395ea72bfe89f835ef89f121b1 /src/engine/pipe.cpp | |
parent | 63cf6f589a35466aa73ff3ec021b5052be733409 (diff) | |
download | wix-096784ea5114cb5bf99151cc047d69951035d152.tar.gz wix-096784ea5114cb5bf99151cc047d69951035d152.tar.bz2 wix-096784ea5114cb5bf99151cc047d69951035d152.zip |
Require Vista (Server 2008) SP2 or newer.
#6318
Diffstat (limited to 'src/engine/pipe.cpp')
-rw-r--r-- | src/engine/pipe.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/engine/pipe.cpp b/src/engine/pipe.cpp index eb3eb863..67eeae87 100644 --- a/src/engine/pipe.cpp +++ b/src/engine/pipe.cpp | |||
@@ -391,16 +391,13 @@ extern "C" HRESULT PipeLaunchChildProcess( | |||
391 | HRESULT hr = S_OK; | 391 | HRESULT hr = S_OK; |
392 | DWORD dwCurrentProcessId = ::GetCurrentProcessId(); | 392 | DWORD dwCurrentProcessId = ::GetCurrentProcessId(); |
393 | LPWSTR sczParameters = NULL; | 393 | LPWSTR sczParameters = NULL; |
394 | OS_VERSION osVersion = OS_VERSION_UNKNOWN; | ||
395 | DWORD dwServicePack = 0; | ||
396 | LPCWSTR wzVerb = NULL; | 394 | LPCWSTR wzVerb = NULL; |
397 | HANDLE hProcess = NULL; | 395 | HANDLE hProcess = NULL; |
398 | 396 | ||
399 | hr = StrAllocFormatted(&sczParameters, L"-q -%ls %ls %ls %u", BURN_COMMANDLINE_SWITCH_ELEVATED, pConnection->sczName, pConnection->sczSecret, dwCurrentProcessId); | 397 | hr = StrAllocFormatted(&sczParameters, L"-q -%ls %ls %ls %u", BURN_COMMANDLINE_SWITCH_ELEVATED, pConnection->sczName, pConnection->sczSecret, dwCurrentProcessId); |
400 | ExitOnFailure(hr, "Failed to allocate parameters for elevated process."); | 398 | ExitOnFailure(hr, "Failed to allocate parameters for elevated process."); |
401 | 399 | ||
402 | OsGetVersion(&osVersion, &dwServicePack); | 400 | wzVerb = !fElevate ? L"open" : L"runas"; |
403 | wzVerb = (OS_VERSION_VISTA > osVersion) || !fElevate ? L"open" : L"runas"; | ||
404 | 401 | ||
405 | // Since ShellExecuteEx doesn't support passing inherited handles, don't bother with CoreAppendFileHandleSelfToCommandLine. | 402 | // Since ShellExecuteEx doesn't support passing inherited handles, don't bother with CoreAppendFileHandleSelfToCommandLine. |
406 | // We could fallback to using ::DuplicateHandle to inject the file handle later if necessary. | 403 | // We could fallback to using ::DuplicateHandle to inject the file handle later if necessary. |