Skip to content

Commit

Permalink
clean up UI handler
Browse files Browse the repository at this point in the history
  • Loading branch information
WitherOrNot committed Mar 28, 2024
1 parent dbb399c commit e6f2780
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions cbsexploder/cbsexploder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int ProcessNextBatchArgs() {
void PrintUsage(LPCWSTR exename) {
wprintf(
L"\n"
"Usage: %s /<mode> /m:<path> /o:<path> [/b:<path>] [/dbg] [/?]\n"
"Usage: %s /<mode> /m:<path> /o:<path> [/log:<path>] [/dbg] [/?] [/b:<path>]\n"
"\nModes:\n"
"/sp\tStage package\n"
"/ip\tInstall package\n"
Expand All @@ -170,6 +170,7 @@ void PrintUsage(LPCWSTR exename) {
"/m\tManifest path for package\n"
"/o\tOffline image Windows directory path\n"
"\nOptional:\n"
"/log\tSet log path (default: C:\\cbsexploder.log)\n"
"/dbg\tEnable debug mode (more verbose output and logging)\n"
"/?\tPrint this usage guide\n"
"/b\tUse batch file\n"
Expand Down Expand Up @@ -303,9 +304,13 @@ int wmain(int argc, LPCWSTR* argv)
g_options.intendedPkgState = CbsInstallState::Unknown;
}
}

printf("\n");

CbsRequiredAction reqAct;
CHK_HR(cbsSess->FinalizeEx(0, &reqAct), "ERROR: Failed to finalize CBS session [HR = %08x]");
CHK_HR(cbsSess->FinalizeEx(0, &reqAct), "\nERROR: Failed to finalize CBS session [HR = %08x]\nCheck log file for details.");

LOG("\nSuccessfully finalized CBS session");

if (reqAct == CbsRequiredAction::Reboot) {
LOG("CBS has indicated that a reboot is required");
Expand Down
1 change: 0 additions & 1 deletion cbsexploder/uihandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ HRESULT UIHandler::Initiate(IEnumCbsUpdate* updates, int* pUnk) {
}

HRESULT UIHandler::Error(HRESULT hr, PCWSTR str, int* pUnk) {
ConLog(" ERROR: %s [HR = %08x]", str, hr);
return S_OK;
}

Expand Down

0 comments on commit e6f2780

Please sign in to comment.