Skip to content

Commit

Permalink
Log bundle registration scope.
Browse files Browse the repository at this point in the history
  • Loading branch information
barnson committed Nov 10, 2024
1 parent a75f23d commit 24bf45a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/burn/engine/apply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ extern "C" HRESULT ApplyUnregister(
IgnoreRollbackError(hrRegistrationRollback, "Dependent registration actions failed");
}

LogId(REPORT_STANDARD, MSG_SESSION_END, pEngineState->registration.sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingRestartToString(restart), LoggingBoolToString(pEngineState->registration.fDisableResume), LoggingRegistrationTypeToString(defaultRegistrationType), LoggingRegistrationTypeToString(registrationType));
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));

if (BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL == pEngineState->plan.action)
{
Expand Down
6 changes: 3 additions & 3 deletions src/burn/engine/engine.mc
Original file line number Diff line number Diff line change
Expand Up @@ -1027,21 +1027,21 @@ MessageId=370
Severity=Success
SymbolicName=MSG_SESSION_BEGIN
Language=English
Session begin, registration key: %1!ls!, options: 0x%2!x!, disable resume: %3!hs!
Session begin, registration key: %1!ls!, scope: %2!hs!, options: 0x%3!x!, disable resume: %4!hs!
.
MessageId=371
Severity=Success
SymbolicName=MSG_SESSION_UPDATE
Language=English
Updating session, registration key: %1!ls!, resume: %2!hs!, restart initiated: %3!hs!, disable resume: %4!hs!
Updating session, registration key: %1!ls!, scope: %2!hs!, resume: %3!hs!, restart initiated: %4!hs!, disable resume: %5!hs!
.
MessageId=372
Severity=Success
SymbolicName=MSG_SESSION_END
Language=English
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!
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!
.
MessageId=373
Expand Down
7 changes: 7 additions & 0 deletions src/burn/engine/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,13 @@ extern "C" LPWSTR LoggingStringOrUnknownIfNull(
return wz ? wz : L"Unknown";
}

extern "C" LPCSTR LoggingInstallScopeToString(
__in BOOL fPerMachine
)
{
return fPerMachine ? "PerMachine" : "PerUser";
}


// internal function declarations

Expand Down
4 changes: 4 additions & 0 deletions src/burn/engine/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ LPWSTR LoggingStringOrUnknownIfNull(
__in LPCWSTR wz
);

LPCSTR LoggingInstallScopeToString(
__in BOOL fPerMachine
);


#if defined(__cplusplus)
}
Expand Down
4 changes: 2 additions & 2 deletions src/burn/engine/registration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ extern "C" HRESULT RegistrationSessionBegin(

AssertSz(BOOTSTRAPPER_REGISTRATION_TYPE_NONE != registrationType, "Registration type can't be NONE");

LogId(REPORT_VERBOSE, MSG_SESSION_BEGIN, pRegistration->sczRegistrationKey, dwRegistrationOptions, LoggingBoolToString(pRegistration->fDisableResume));
LogId(REPORT_VERBOSE, MSG_SESSION_BEGIN, pRegistration->sczRegistrationKey, LoggingInstallScopeToString(pRegistration->fPerMachine), dwRegistrationOptions, LoggingBoolToString(pRegistration->fDisableResume));

// Cache bundle executable.
if (dwRegistrationOptions & BURN_REGISTRATION_ACTION_OPERATIONS_CACHE_BUNDLE)
Expand Down Expand Up @@ -1259,7 +1259,7 @@ static HRESULT UpdateResumeMode(
LPWSTR sczRunOnceCommandLine = NULL;
LPCWSTR sczResumeKey = REGISTRY_RUN_ONCE_KEY;

LogId(REPORT_STANDARD, MSG_SESSION_UPDATE, pRegistration->sczRegistrationKey, LoggingResumeModeToString(resumeMode), LoggingBoolToString(fRestartInitiated), LoggingBoolToString(pRegistration->fDisableResume));
LogId(REPORT_STANDARD, MSG_SESSION_UPDATE, pRegistration->sczRegistrationKey, LoggingInstallScopeToString(pRegistration->fPerMachine), LoggingResumeModeToString(resumeMode), LoggingBoolToString(fRestartInitiated), LoggingBoolToString(pRegistration->fDisableResume));

// write resume information
if (hkRegistration)
Expand Down
2 changes: 1 addition & 1 deletion src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void Execute()
command.Execute();
}

// Find the primary boostrapper application and optional secondary.
// Find the primary bootstrapper application and optional secondary.
WixBootstrapperApplicationSymbol primaryBootstrapperApplicationSymbol = null;
WixBootstrapperApplicationSymbol secondaryBootstrapperApplicationSymbol = null;
{
Expand Down

0 comments on commit 24bf45a

Please sign in to comment.