diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-03 17:50:22 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-07 19:44:36 -0500 |
commit | 8810aa8908ed7887616d86dd5fb821fcfa92f444 (patch) | |
tree | 8bc05667c36cc0d3db73504c867e85b01f1a79b0 /src/test | |
parent | 266b097c0b0a13dd4934f55f61cad62ffcbb953d (diff) | |
download | wix-8810aa8908ed7887616d86dd5fb821fcfa92f444.tar.gz wix-8810aa8908ed7887616d86dd5fb821fcfa92f444.tar.bz2 wix-8810aa8908ed7887616d86dd5fb821fcfa92f444.zip |
Update Burn algorithm for picking elevated temp path to use SystemTemp.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp | 30 | ||||
-rw-r--r-- | src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h | 3 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp index 3cf994fc..bc942dc8 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp | |||
@@ -30,6 +30,7 @@ static THEME_ASSIGN_CONTROL_ID vrgInitControls[] = { | |||
30 | { BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD, L"StandardProgressBar" }, | 30 | { BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD, L"StandardProgressBar" }, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static HRESULT LogUserSid(); | ||
33 | static void CALLBACK BafThmUtilTestingTraceError( | 34 | static void CALLBACK BafThmUtilTestingTraceError( |
34 | __in_z LPCSTR szFile, | 35 | __in_z LPCSTR szFile, |
35 | __in int iLine, | 36 | __in int iLine, |
@@ -494,6 +495,8 @@ HRESULT WINAPI CreateBAFunctions( | |||
494 | pResults->pvBAFunctionsProcContext = pBAFunctions; | 495 | pResults->pvBAFunctionsProcContext = pBAFunctions; |
495 | pBAFunctions = NULL; | 496 | pBAFunctions = NULL; |
496 | 497 | ||
498 | LogUserSid(); | ||
499 | |||
497 | LExit: | 500 | LExit: |
498 | ReleaseObject(pBAFunctions); | 501 | ReleaseObject(pBAFunctions); |
499 | ReleaseObject(pEngine); | 502 | ReleaseObject(pEngine); |
@@ -501,6 +504,33 @@ LExit: | |||
501 | return hr; | 504 | return hr; |
502 | } | 505 | } |
503 | 506 | ||
507 | static HRESULT LogUserSid() | ||
508 | { | ||
509 | HRESULT hr = S_OK; | ||
510 | TOKEN_USER* pTokenUser = NULL; | ||
511 | LPWSTR sczSid = NULL; | ||
512 | |||
513 | hr = ProcTokenUser(::GetCurrentProcess(), &pTokenUser); | ||
514 | BalExitOnFailure(hr, "Failed to get user from process token."); | ||
515 | |||
516 | if (!::ConvertSidToStringSidW(pTokenUser->User.Sid, &sczSid)) | ||
517 | { | ||
518 | BalExitWithLastError(hr, "Failed to convert sid to string."); | ||
519 | } | ||
520 | |||
521 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Current User SID: %ls", sczSid); | ||
522 | |||
523 | LExit: | ||
524 | ReleaseMem(pTokenUser); | ||
525 | |||
526 | if (sczSid) | ||
527 | { | ||
528 | ::LocalFree(sczSid); | ||
529 | } | ||
530 | |||
531 | return hr; | ||
532 | } | ||
533 | |||
504 | static void CALLBACK BafThmUtilTestingTraceError( | 534 | static void CALLBACK BafThmUtilTestingTraceError( |
505 | __in_z LPCSTR /*szFile*/, | 535 | __in_z LPCSTR /*szFile*/, |
506 | __in int /*iLine*/, | 536 | __in int /*iLine*/, |
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h b/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h index e7cd39dc..2e14786a 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/precomp.h | |||
@@ -16,12 +16,15 @@ | |||
16 | #include <stdlib.h> | 16 | #include <stdlib.h> |
17 | #include <strsafe.h> | 17 | #include <strsafe.h> |
18 | #include <CommCtrl.h> | 18 | #include <CommCtrl.h> |
19 | #include <sddl.h> | ||
19 | 20 | ||
20 | #include "dutil.h" | 21 | #include "dutil.h" |
21 | #include "dictutil.h" | 22 | #include "dictutil.h" |
22 | #include "fileutil.h" | 23 | #include "fileutil.h" |
23 | #include "locutil.h" | 24 | #include "locutil.h" |
25 | #include "memutil.h" | ||
24 | #include "pathutil.h" | 26 | #include "pathutil.h" |
27 | #include "procutil.h" | ||
25 | #include "strutil.h" | 28 | #include "strutil.h" |
26 | #include "thmutil.h" | 29 | #include "thmutil.h" |
27 | #include "regutil.h" | 30 | #include "regutil.h" |