diff --git a/cbsexploder/cbsexploder.cpp b/cbsexploder/cbsexploder.cpp index 45b1c59..ac88c12 100644 --- a/cbsexploder/cbsexploder.cpp +++ b/cbsexploder/cbsexploder.cpp @@ -185,7 +185,7 @@ void PrintUsage(LPCWSTR exename) { int wmain(int argc, LPCWSTR* argv) { - printf("cbsexploder 0.0.2 by witherornot\n"); + printf("cbsexploder 0.0.3 by witherornot\n"); if (ProcessOptions(argc, argv, TRUE)) { PrintUsage(argv[0]); @@ -201,7 +201,8 @@ int wmain(int argc, LPCWSTR* argv) ASRT_NL(GetFullPathNameW(g_options.logPath, MAX_PATH, fullLogPath, NULL), "ERROR: Log path %s is invalid", g_options.logPath); SetEnvironmentVariableW(L"COMPONENT_BASED_SERVICING_LOGFILE", g_options.logPath); - CHK_NL_HR(CoInitialize(NULL), "ERROR: CoInitialize Failed [HR = %08x]"); + CHK_NL_HR(CoInitializeEx(NULL, COINIT_MULTITHREADED), "ERROR: CoInitialize Failed [HR = %08x]"); + CHK_NL_HR(CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_PKT_INTEGRITY, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, 0, NULL), "ERROR: CoInitializeSecurity Failed [HR = %08x]"); CHK_NL_HR(CoGetMalloc(1, &g_alloc), "ERROR: CoGetMalloc Failed [HR = %08x]"); if (LoadServicingStackLocal()) { diff --git a/cbsexploder/uihandler.cpp b/cbsexploder/uihandler.cpp index 97e9180..6758a79 100644 --- a/cbsexploder/uihandler.cpp +++ b/cbsexploder/uihandler.cpp @@ -51,7 +51,7 @@ HRESULT UIHandler::EnteringStage(UINT unk1, CbsOperationStage stage, int unk2, i } HRESULT UIHandler::Progress(CbsInstallState state, UINT cur, UINT total, int* pUnk) { - ConLog("Progress: %.1f%% [Current Status: %s]", 100.0 * cur / total, PkgStateAsStr(state)); + printf("\rProgress: %.1f%%", 100.0 * cur / total); return S_OK; } @@ -60,6 +60,6 @@ HRESULT UIHandler::ProgressEx(CbsInstallState state, UINT cur, UINT total, UINT } HRESULT UIHandler::Terminate() { - ConLog("Operations finished, waiting for cleanup..."); + ConLog("\nOperations finished, waiting for cleanup..."); return S_OK; } \ No newline at end of file