Fix FileOnlyEntry crashing on older versions of Windows - #27880
Merged
Dongbo Wang (daxian-dbw) merged 3 commits intoAug 26, 2026
Merged
Fix FileOnlyEntry crashing on older versions of Windows#27880Dongbo Wang (daxian-dbw) merged 3 commits into
FileOnlyEntry crashing on older versions of Windows#27880Dongbo Wang (daxian-dbw) merged 3 commits into
Conversation
Patrick Meinecke (SeeminglyScience)
requested a review
from Travis Plunk (TravisEz13)
as a code owner
August 21, 2026 20:52
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Patrick Meinecke (SeeminglyScience)
August 21, 2026 20:53
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents SystemPolicy.IsFileOnlyEntryEnabled() from crashing on older Windows versions where WldpGetApplicationSettingBoolean (or its containing DLL) may be unavailable, by catching DllNotFoundException / EntryPointNotFoundException and treating the setting as disabled.
Changes:
- Introduced a helper that wraps
WldpGetApplicationSettingBooleanand catches missing-DLL/entrypoint exceptions. - Updated the
FileOnlyEntrysetting query path to use the helper and preserve existing “treat failures as false” behavior. - Added ETW logging for the exception/fallback path.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
Close and re-open the issue to trigger CI runs. |
Dongbo Wang (daxian-dbw)
approved these changes
Aug 26, 2026
Travis Plunk (TravisEz13)
approved these changes
Aug 26, 2026
Dongbo Wang (daxian-dbw)
merged commit Aug 26, 2026
80fdeb9
into
PowerShell:master
81 of 88 checks passed
This was referenced Sep 1, 2026
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.
PR Summary
Fixes an issue where the
FileOnlyEntrychange was crashing older versions of PowerShell. NowEntryPointNotFoundexceptions will be caught and treated like a false result.PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header