Update install_worker.cc

This commit is contained in:
Alexander David Frick 2022-07-15 20:11:19 -05:00 committed by GitHub
parent e266fb79fd
commit 7cc2443260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -968,6 +968,22 @@ void AddNativeNotificationWorkItems(
notification_helper_path.value(), true);
}
void AddWerHelperRegistration(HKEY root,
const base::FilePath& wer_helper_path,
WorkItemList* list) {
DCHECK(!wer_helper_path.empty());
std::wstring wer_registry_path = GetWerHelperRegistryPath();
list->AddCreateRegKeyWorkItem(root, wer_registry_path,
WorkItem::kWow64Default);
// The DWORD value is not important.
list->AddSetRegValueWorkItem(root, wer_registry_path, WorkItem::kWow64Default,
wer_helper_path.value().c_str(), DWORD{0},
/*overwrite=*/true);
}
void AddSetMsiMarkerWorkItem(const InstallerState& installer_state,
bool set,
WorkItemList* work_item_list) {
@ -1126,6 +1142,10 @@ void AddFinalizeUpdateWorkItems(const base::Version& new_version,
// overwriting any of the following post-install tasks.
AddDowngradeCleanupItems(new_version, list);
AddWerHelperRegistration(
installer_state.root_key(),
GetWerHelperPath(installer_state.target_path(), new_version), list);
const std::wstring client_state_key = install_static::GetClientStateKeyPath();
// Adds the command that needs to be used in order to cleanup any breaking