Ensure MOTW failures are called out in logs#6127
Open
Trenly wants to merge 5 commits intomicrosoft:masterfrom
Open
Ensure MOTW failures are called out in logs#6127Trenly wants to merge 5 commits intomicrosoft:masterfrom
Trenly wants to merge 5 commits intomicrosoft:masterfrom
Conversation
JohnMcPMS
reviewed
Apr 6, 2026
Comment on lines
+498
to
+503
| auto hrRemove = zoneIdentifier->Remove(); | ||
| if (FAILED(hrRemove)) | ||
| { | ||
| AICLI_LOG(Core, Error, << "IZoneIdentifier::Remove failed. Result: " << hrRemove); | ||
| THROW_IF_FAILED(hrRemove); | ||
| } |
Member
There was a problem hiding this comment.
This is unnecessary, the WIL logging infrastructure will take care of this enough that we won't have lost any information.
Same with Save call below and other places in the file.
Contributor
Author
There was a problem hiding this comment.
Thanks @JohnMcPMS - Believe I've resolved in the latest commit
This comment has been minimized.
This comment has been minimized.
|
Sorry to ask here. 🙏🏼 Is there any unknown reason that blocks this PR? A new preview version of |
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix MOTW security check failures for downloaded installers
Problem
All installer downloads were failing the security check with 0x80070003 (ERROR_PATH_NOT_FOUND), causing every install to terminate with "Installer failed security check".
Two root causes were identified:
temporary pre-hash-validation file (a raw SHA256 hex string with no extension, e.g. aab2dc8e…) rather than the final installer (e.g. BadlionClient.exe).
Important
Shell32's AES relies on file extension for MIME-type detection, scan policy, and zone assignment, so scanning an extensionless file produced unreliable results
called and the whole check returning a failure code. Additionally, a missing THROW_IF_FAILED(hr) after IPersistFile::Load meant unexpected load errors were silently ignored, leading to Remove()/Save()
being called on a non-loaded object.
Changes
DownloadFlow.cpp
Downloader.cpp — RemoveMotwIfApplicable
Downloader.cpp — ApplyMotwUsingIAttachmentExecuteIfApplicable
security scan.
CoInitializeEx so failures are captured through WIL.
never updated
Microsoft Reviewers: Open in CodeFlow