Log bundle registration scope.
Bob Arnson committed
Nov 9, 2024 at 23:54 UTC
53d84c9b96b027df505ab99f3db0719a82108b2b
5 files changed
+17
-6
src/burn/engine/apply.cpp
+1
-1
@@ -536,7 +536,7 @@ extern "C" HRESULT ApplyUnregister(
536
IgnoreRollbackError(hrRegistrationRollback, "Dependent registration actions failed");
537
}
538
539
- LogId(REPORT_STANDARD, MSG_SESSION_END, pEngineState->registration.sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingRestartToString(restart), LoggingBoolToString(pEngineState->registration.fDisableResume), LoggingRegistrationTypeToString(defaultRegistrationType), LoggingRegistrationTypeToString(registrationType));
539
+ LogId(REPORT_STANDARD, MSG_SESSION_END, pEngineState->registration.sczRegistrationKey, LoggingInstallScopeToString(pEngineState->registration.fPerMachine), LoggingResumeModeToString(resumeMode), LoggingRestartToString(restart), LoggingBoolToString(pEngineState->registration.fDisableResume), LoggingRegistrationTypeToString(defaultRegistrationType), LoggingRegistrationTypeToString(registrationType));
540
541
if (BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action)
542
{
src/burn/engine/engine.mc
+3
-3
@@ -1027,21 +1027,21 @@ MessageId=370
1027
Severity=Success
1028
SymbolicName=MSG_SESSION_BEGIN
1029
Language=English
1030
-Session begin, registration key: %1!ls!, options: 0x%2!x!, disable resume: %3!hs!
1030
+Session begin, registration key: %1!ls!, scope: %2!hs!, options: 0x%3!x!, disable resume: %4!hs!
1031
.
1032
1033
MessageId=371
1034
Severity=Success
1035
SymbolicName=MSG_SESSION_UPDATE
1036
Language=English
1037
-Updating session, registration key: %1!ls!, resume: %2!hs!, restart initiated: %3!hs!, disable resume: %4!hs!
1037
+Updating session, registration key: %1!ls!, scope: %2!hs!, resume: %3!hs!, restart initiated: %4!hs!, disable resume: %5!hs!
1038
.
1039
1040
MessageId=372
1041
Severity=Success
1042
SymbolicName=MSG_SESSION_END
1043
Language=English
1044
-Session end, registration key: %1!ls!, resume: %2!hs!, restart: %3!hs!, disable resume: %4!hs!, default registration: %5!hs!, ba requested registration: %6!hs!
1044
+Session end, registration key: %1!ls!, scope: %2!hs!, resume: %3!hs!, restart: %4!hs!, disable resume: %5!hs!, default registration: %6!hs!, ba requested registration: %7!hs!
1045
.
1046
1047
MessageId=373
src/burn/engine/logging.cpp
+7
@@ -959,6 +959,13 @@ extern "C" LPWSTR LoggingStringOrUnknownIfNull(
959
return wz ? wz : L"Unknown";
960
}
961
962
+extern "C" LPCSTR LoggingInstallScopeToString(
963
+ __in BOOL fPerMachine
964
+ )
965
+{
966
+ return fPerMachine ? "PerMachine" : "PerUser";
967
+}
968
+
969
970
// internal function declarations
971
src/burn/engine/logging.h
+4
@@ -198,6 +198,10 @@ LPWSTR LoggingStringOrUnknownIfNull(
198
__in LPCWSTR wz
199
);
200
201
+LPCSTR LoggingInstallScopeToString(
202
+ __in BOOL fPerMachine
203
+ );
204
+
205
206
#if defined(__cplusplus)
207
}
src/burn/engine/registration.cpp
+2
-2
@@ -616,7 +616,7 @@ extern "C" HRESULT RegistrationSessionBegin(
616
617
AssertSz(BOOTSTRAPPER_REGISTRATION_TYPE_NONE != registrationType, "Registration type can't be NONE");
618
619
- LogId(REPORT_VERBOSE, MSG_SESSION_BEGIN, pRegistration->sczRegistrationKey, dwRegistrationOptions, LoggingBoolToString(pRegistration->fDisableResume));
619
+ LogId(REPORT_VERBOSE, MSG_SESSION_BEGIN, pRegistration->sczRegistrationKey, LoggingInstallScopeToString(pRegistration->fPerMachine), dwRegistrationOptions, LoggingBoolToString(pRegistration->fDisableResume));
620
621
// Cache bundle executable.
622
if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE)
@@ -1259,7 +1259,7 @@ static HRESULT UpdateResumeMode(
1259
LPWSTR sczRunOnceCommandLine = NULL;
1260
LPCWSTR sczResumeKey = REGISTRY_RUN_ONCE_KEY;
1261
1262
- LogId(REPORT_STANDARD, MSG_SESSION_UPDATE, pRegistration->sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingBoolToString(fRestartInitiated), LoggingBoolToString(pRegistration->fDisableResume));
1262
+ LogId(REPORT_STANDARD, MSG_SESSION_UPDATE, pRegistration->sczRegistrationKey, LoggingInstallScopeToString(pRegistration->fPerMachine), LoggingResumeModeToString(resumeMode), LoggingBoolToString(fRestartInitiated), LoggingBoolToString(pRegistration->fDisableResume));
1263
1264
// write resume information
1265
if (hkRegistration)